[webpack5] --env.uglify no longer supported?
See original GitHub issueEnvironment
- 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:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
--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)
Thanks for checking!