From 8fbcc1d678983c69bda004e08204a0d94d83bbba Mon Sep 17 00:00:00 2001 From: Kristian Dimitrov Date: Thu, 21 Feb 2019 15:16:15 +0200 Subject: [PATCH] fix: initial compilation always generates same compilation hash --- templates/webpack.angular.js | 2 ++ templates/webpack.javascript.js | 2 ++ templates/webpack.typescript.js | 2 ++ templates/webpack.vue.js | 2 ++ 4 files changed, 8 insertions(+) diff --git a/templates/webpack.angular.js b/templates/webpack.angular.js index 64d6087e..cf54f9d9 100644 --- a/templates/webpack.angular.js +++ b/templates/webpack.angular.js @@ -13,6 +13,7 @@ const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin"); const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); const { AngularCompilerPlugin } = require("@ngtools/webpack"); +const hashSalt = Date.now().toString(); module.exports = env => { // Add your custom Activities, Services and other Android app components here. @@ -109,6 +110,7 @@ module.exports = env => { libraryTarget: "commonjs2", filename: "[name].js", globalObject: "global", + hashSalt }, resolve: { extensions: [".ts", ".js", ".scss", ".css"], diff --git a/templates/webpack.javascript.js b/templates/webpack.javascript.js index 780e9ecd..1999aa62 100644 --- a/templates/webpack.javascript.js +++ b/templates/webpack.javascript.js @@ -8,6 +8,7 @@ const CopyWebpackPlugin = require("copy-webpack-plugin"); const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin"); const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); +const hashSalt = Date.now().toString(); module.exports = env => { // Add your custom Activities, Services and other android app components here. @@ -71,6 +72,7 @@ module.exports = env => { libraryTarget: "commonjs2", filename: "[name].js", globalObject: "global", + hashSalt }, resolve: { extensions: [".js", ".scss", ".css"], diff --git a/templates/webpack.typescript.js b/templates/webpack.typescript.js index 913977c9..460a4f37 100644 --- a/templates/webpack.typescript.js +++ b/templates/webpack.typescript.js @@ -8,6 +8,7 @@ const CopyWebpackPlugin = require("copy-webpack-plugin"); const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin"); const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); +const hashSalt = Date.now().toString(); module.exports = env => { // Add your custom Activities, Services and other Android app components here. @@ -71,6 +72,7 @@ module.exports = env => { libraryTarget: "commonjs2", filename: "[name].js", globalObject: "global", + hashSalt }, resolve: { extensions: [".ts", ".js", ".scss", ".css"], diff --git a/templates/webpack.vue.js b/templates/webpack.vue.js index 18a09ff3..a07fa923 100644 --- a/templates/webpack.vue.js +++ b/templates/webpack.vue.js @@ -12,6 +12,7 @@ const NsVueTemplateCompiler = require("nativescript-vue-template-compiler"); const nsWebpack = require("nativescript-dev-webpack"); const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target"); const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin"); +const hashSalt = Date.now().toString(); module.exports = env => { // Add your custom Activities, Services and other android app components here. @@ -79,6 +80,7 @@ module.exports = env => { libraryTarget: "commonjs2", filename: "[name].js", globalObject: "global", + hashSalt }, resolve: { extensions: [".vue", ".ts", ".js", ".scss", ".css"],