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

Commit ba6d896

Browse files
authored
fix: initial compilation always generates same compilation hash (#815)
1 parent d1345f2 commit ba6d896

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

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.
@@ -109,6 +110,7 @@ module.exports = env => {
109110
libraryTarget: "commonjs2",
110111
filename: "[name].js",
111112
globalObject: "global",
113+
hashSalt
112114
},
113115
resolve: {
114116
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.
@@ -71,6 +72,7 @@ module.exports = env => {
7172
libraryTarget: "commonjs2",
7273
filename: "[name].js",
7374
globalObject: "global",
75+
hashSalt
7476
},
7577
resolve: {
7678
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.
@@ -71,6 +72,7 @@ module.exports = env => {
7172
libraryTarget: "commonjs2",
7273
filename: "[name].js",
7374
globalObject: "global",
75+
hashSalt
7476
},
7577
resolve: {
7678
extensions: [".ts", ".js", ".scss", ".css"],

Diff for: templates/webpack.vue.js

+2
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.
@@ -79,6 +80,7 @@ module.exports = env => {
7980
libraryTarget: "commonjs2",
8081
filename: "[name].js",
8182
globalObject: "global",
83+
hashSalt
8284
},
8385
resolve: {
8486
extensions: [".vue", ".ts", ".js", ".scss", ".css"],

0 commit comments

Comments
 (0)