question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[webpack5] --env.uglify no longer supported?

See original GitHub issue

Environment

  • CLI: ├── nativescript@8.0.2
  • Cross-platform modules: @nativescript/core@8.0.8
  • Android Runtime: ├── @nativescript/android@8.0.0
  • iOS Runtime: ├── @nativescript/ios@6.5.4 (JSC)
  • Plugin(s): ├── @nativescript/core@8.0.8 ├── @nativescript/types@8.0.1 ├── @nativescript/webpack@5.0.0-beta.15

Describe the bug As it seems the recommended optimization using Uglify.is no longer supported since NativeScript 8 and Webpack 5 (however documented): https://docs.nativescript.org/performance.html#uglify-js

To Reproduce Run ns build android|ios --env.uglify vs ns build android|ios --> no difference in app size.

Expected behavior Either working or if no longer necessary with Webpack5 a clarification of the documentation 😃. Thanks in advance!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rigor789commented, Feb 1, 2022

--release + --env.production should minify the bundle, --env.uglify no longer works (it’s enabled with --env.production and it uses Terser now, and is very much a legacy flag).

The docs contain all the valid flags here: https://docs.nativescript.org/webpack.html#env-flags (has been updated a little while ago, just not linked to this issue, so I’m going to close it)

0reactions
fpaaskecommented, Feb 1, 2022

Thanks for checking!

Read more comments on GitHub >

github_iconTop Results From Across the Web

uglify-es is no longer maintained · Issue #349 - GitHub
According to the maintainer uglify-es is no longer maintained and uglify-js does not support ES6+ If we use Babel with preset-env and we ......
Read more >
webpack 5 Error "Can't resolve 'uglify-js', '@swc/core', 'esbuild'
app.js requires, which in turn tries to require a bunch of third-party stuff, which is not available - hence the errors on missing...
Read more >
TerserWebpackPlugin | webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >
Top 5 Changes in webpack v5 - Ryan H. Lewis
An advantage of doing this check is that you may find plugins that have been deprecated or are no longer supported. When going...
Read more >
Getting started with webpack - Part 5: Introduction to plugins
At its core, webpack has very good support for plugins. ... webpack plugins, you should also know that you can, based on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found