Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Set webpack in production mode based on --release option #911

Closed
rosen-vladimirov opened this issue May 26, 2019 · 0 comments
Closed

Set webpack in production mode based on --release option #911

rosen-vladimirov opened this issue May 26, 2019 · 0 comments
Assignees
Labels
breaking-change CLI-6.0.0 Describes issues related to NativeScript 6.0.0 release feature migration-to-bundle The issue is describing a breaking change in the Bundle workflow compared to the Legacy one.

Comments

@rosen-vladimirov
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Webpack has two modes - development and production. Currently they are switched on automatically based on the --env.uglify option, however it seems much more convenient to set it based on the --release flag.

Describe the solution you'd like
When --release is passed - set the mode to production. When it is not - set it to development.

Describe alternatives you've considered
None

Additional context
None

@rosen-vladimirov rosen-vladimirov added breaking-change feature migration-to-bundle The issue is describing a breaking change in the Bundle workflow compared to the Legacy one. CLI-6.0.0 Describes issues related to NativeScript 6.0.0 release labels May 26, 2019
Fatme added a commit to NativeScript/nativescript-cli that referenced this issue May 31, 2019
@Fatme Fatme self-assigned this May 31, 2019
Fatme added a commit that referenced this issue May 31, 2019
Fatme added a commit to NativeScript/nativescript-cli that referenced this issue May 31, 2019
Fatme added a commit that referenced this issue Jun 5, 2019
Fatme added a commit that referenced this issue Jun 6, 2019
Fatme added a commit that referenced this issue Jun 10, 2019
Fatme added a commit that referenced this issue Jun 12, 2019
Fatme added a commit that referenced this issue Jun 15, 2019
rosen-vladimirov pushed a commit that referenced this issue Jun 19, 2019
* fix: don't provide fake paths to the {N} CLI - relative to the `app` folder

* feat: remove not needed hooks

* feat: remove webpack compiler logic

* fix: don't copy app_resources to the platforms folder

* fix: respect --env.verbose

* feat: respect production mode based on release option

Implements: #911

* fix: watch platform specific files from node_modules

Rel to: NativeScript/nativescript-cli#4480

* fix: don't emit absolute webpack's runtime files

Previously we needed to emit files with full paths as {N} CLI relies on this and expected them in a such format. With the changes for "webpack-only" mode, {N} CLI expects only relative paths. So we need to fix this in order to ensure that runtime.js file will not be transferred on device on change in hmr mode.

* fix: don't process runtime.js files

We needed a special processing for `runtime.js` files as we excluded them when transferring the files on device. As the CLI is filtering and emit only hot-update files we don't need this logic anymore.

* fix: emit runtime files and entry point files

* fix: update webpack config files of demo apps

* fix: don't use short imports in demo apps

* fix: update dependencies of demo apps so they are compatible with 6.0 release
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change CLI-6.0.0 Describes issues related to NativeScript 6.0.0 release feature migration-to-bundle The issue is describing a breaking change in the Bundle workflow compared to the Legacy one.
Projects
None yet
Development

No branches or pull requests

3 participants