This repository has been archived by the owner on Aug 7, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(prepare): clean platforms/.../app/ when running webpack
Every time we are running a new build with webpack the platforms/.../app/ dir should be deleted as there may be old assets left. Ex. When the app bundled with snapshot enabled: ``` tns build android --bundle --env.snapshot ``` this produces some assets: ``` platforms/android/.../app/vendor.js platforms/android/.../app/_embedded_script.js // ... ``` Then, if the project is bundled without snapshot: ``` tns build android --bundle ``` the produced assets will override the ones that are already in `platforms/android/.../app`. However, since the build is without snapshot, an `_embedded_script.js` won't be generated to override the one that's left in `platforms/android/.../app` from the previous build. We'll be using `CleanWebpackPlugin` to clean the dist folder. ** Important **: Currently we're running two webpack builds when doing `tns run android|ios` - one on prepare and one when the watcher starts. This means that the dist folder will be cleaned two times. This will be resolved when NativeScript/nativescript-cli#3404 is implemented. fixes #463
- Loading branch information
Showing
4 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters