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

Commit 41b0a64

Browse files
Merge pull request #833 from NativeScript/svetoslavtsenov/merge-release-in-master
chore: merge release in master
2 parents f476c56 + 9bb7ec3 commit 41b0a64

8 files changed

+35
-9
lines changed

Diff for: CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
<a name="0.20.3"></a>
2+
## [0.20.3](https://github.com/NativeScript/nativescript-dev-webpack/compare/0.20.2...0.20.3) (2019-03-14)
3+
4+
5+
### Bug Fixes
6+
7+
* initial compilation always generates same compilation hash ([#815](https://github.com/NativeScript/nativescript-dev-webpack/issues/815)) ([ba6d896](https://github.com/NativeScript/nativescript-dev-webpack/commit/ba6d896))
8+
* show message for stopping webpack only when it has been started ([#821](https://github.com/NativeScript/nativescript-dev-webpack/issues/821)) ([1bd18e5](https://github.com/NativeScript/nativescript-dev-webpack/commit/1bd18e5))
9+
* **HMR:** modulePath on Windows to apply changes in app styles at runtime ([#807](https://github.com/NativeScript/nativescript-dev-webpack/issues/807)) ([cc55d4f](https://github.com/NativeScript/nativescript-dev-webpack/commit/cc55d4f))
10+
11+
12+
### Features
13+
14+
* **Vue:** option to enable sourcemaps ([#774](https://github.com/NativeScript/nativescript-dev-webpack/issues/774)) ([70cd58a](https://github.com/NativeScript/nativescript-dev-webpack/commit/70cd58a))
15+
16+
17+
118
<a name="0.20.1"></a>
219
## [0.20.1](https://github.com/NativeScript/nativescript-dev-webpack/compare/0.20.0...0.20.1) (2019-02-18)
320

Diff for: lib/after-watch.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ const { stopWebpackCompiler } = require('./compiler');
22
const { removeListener } = require("./utils");
33

44
module.exports = function($logger, $liveSyncService) {
5-
$logger.info("Stopping webpack watch");
6-
stopWebpackCompiler();
5+
stopWebpackCompiler($logger);
76
removeListener($liveSyncService, "liveSyncStopped");
87
removeListener(process, "exit");
98
}

Diff for: lib/before-watch.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ module.exports = function ($logger, $liveSyncService, $devicesService, hookArgs)
1010
Object.keys(webpackProcesses).forEach(platform => {
1111
const devices = $devicesService.getDevicesForPlatform(platform);
1212
if (!devices || !devices.length) {
13-
stopWebpackCompiler(platform);
13+
stopWebpackCompiler($logger, platform);
1414
}
1515
});
1616
});
17-
addListener(process, "exit", stopWebpackCompiler);
17+
addListener(process, "exit", () => stopWebpackCompiler($logger));
1818

1919
const platforms = hookArgs.config.platforms;
2020
return Promise.all(platforms.map(platform => {

Diff for: lib/compiler.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ exports.runWebpackCompiler = function runWebpackCompiler(config, $projectData, $
123123
}
124124
}
125125

126-
exports.stopWebpackCompiler = function stopWebpackCompiler(platform) {
126+
exports.stopWebpackCompiler = function stopWebpackCompiler($logger, platform) {
127127
if (platform) {
128-
stopWebpackForPlatform(platform);
128+
stopWebpackForPlatform($logger, platform);
129129
} else {
130-
Object.keys(webpackProcesses).forEach(platform => stopWebpackForPlatform(platform));
130+
Object.keys(webpackProcesses).forEach(platform => stopWebpackForPlatform($logger, platform));
131131
}
132132
}
133133

@@ -171,7 +171,8 @@ function logSnapshotWarningMessage($logger) {
171171
}
172172
}
173173

174-
function stopWebpackForPlatform(platform) {
174+
function stopWebpackForPlatform($logger, platform) {
175+
$logger.trace(`Stopping webpack watch for platform ${platform}.`);
175176
const webpackProcess = webpackProcesses[platform];
176177
if (webpackProcess) {
177178
webpackProcess.kill("SIGINT");

Diff for: templates/webpack.angular.js

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
1313
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
1414
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
1515
const { AngularCompilerPlugin } = require("@ngtools/webpack");
16+
const hashSalt = Date.now().toString();
1617

1718
module.exports = env => {
1819
// Add your custom Activities, Services and other Android app components here.
@@ -112,6 +113,7 @@ module.exports = env => {
112113
libraryTarget: "commonjs2",
113114
filename: "[name].js",
114115
globalObject: "global",
116+
hashSalt
115117
},
116118
resolve: {
117119
extensions: [".ts", ".js", ".scss", ".css"],

Diff for: templates/webpack.javascript.js

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const CopyWebpackPlugin = require("copy-webpack-plugin");
88
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
99
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
1010
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
11+
const hashSalt = Date.now().toString();
1112

1213
module.exports = env => {
1314
// Add your custom Activities, Services and other android app components here.
@@ -73,6 +74,7 @@ module.exports = env => {
7374
libraryTarget: "commonjs2",
7475
filename: "[name].js",
7576
globalObject: "global",
77+
hashSalt
7678
},
7779
resolve: {
7880
extensions: [".js", ".scss", ".css"],

Diff for: templates/webpack.typescript.js

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const CopyWebpackPlugin = require("copy-webpack-plugin");
88
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
99
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
1010
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
11+
const hashSalt = Date.now().toString();
1112

1213
module.exports = env => {
1314
// Add your custom Activities, Services and other Android app components here.
@@ -73,6 +74,7 @@ module.exports = env => {
7374
libraryTarget: "commonjs2",
7475
filename: "[name].js",
7576
globalObject: "global",
77+
hashSalt
7678
},
7779
resolve: {
7880
extensions: [".ts", ".js", ".scss", ".css"],

Diff for: templates/webpack.vue.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const NsVueTemplateCompiler = require("nativescript-vue-template-compiler");
1212
const nsWebpack = require("nativescript-dev-webpack");
1313
const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target");
1414
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
15+
const hashSalt = Date.now().toString();
1516

1617
module.exports = env => {
1718
// Add your custom Activities, Services and other android app components here.
@@ -44,6 +45,7 @@ module.exports = env => {
4445
production, // --env.production
4546
report, // --env.report
4647
hmr, // --env.hmr
48+
sourceMap, // --env.sourceMap
4749
} = env;
4850

4951
const externals = nsWebpack.getConvertedExternals(env.externals);
@@ -81,6 +83,7 @@ module.exports = env => {
8183
libraryTarget: "commonjs2",
8284
filename: "[name].js",
8385
globalObject: "global",
86+
hashSalt
8487
},
8588
resolve: {
8689
extensions: [".vue", ".ts", ".js", ".scss", ".css"],
@@ -111,7 +114,7 @@ module.exports = env => {
111114
"fs": "empty",
112115
"__dirname": false,
113116
},
114-
devtool: "none",
117+
devtool: sourceMap ? "inline-source-map" : "none",
115118
optimization: {
116119
runtimeChunk: "single",
117120
splitChunks: {

0 commit comments

Comments
 (0)