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

Commit 4f481b9

Browse files
committed
fix: watch platform specific files from node_modules
Rel to: NativeScript/nativescript-cli#4480
1 parent 0bde5f9 commit 4f481b9

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"copy-webpack-plugin": "~4.6.0",
4545
"css-loader": "~2.1.1",
4646
"fork-ts-checker-webpack-plugin": "1.3.0",
47+
"extra-watch-webpack-plugin": "1.0.3",
4748
"global-modules-path": "2.0.0",
4849
"minimatch": "3.0.4",
4950
"nativescript-hook": "0.2.4",

Diff for: templates/webpack.javascript.js

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const nsWebpack = require("nativescript-dev-webpack");
55
const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target");
66
const CleanWebpackPlugin = require("clean-webpack-plugin");
77
const CopyWebpackPlugin = require("copy-webpack-plugin");
8+
const ExtraWatchWebpackPlugin = require('extra-watch-webpack-plugin');
89
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
910
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
1011
const TerserPlugin = require("terser-webpack-plugin");
@@ -234,6 +235,9 @@ module.exports = env => {
234235
}),
235236
// Does IPC communication with the {N} CLI to notify events when running in watch mode.
236237
new nsWebpack.WatchStateLoggerPlugin(),
238+
new ExtraWatchWebpackPlugin({
239+
files: [`node_modules/**/*.${platform}.js`]
240+
})
237241
],
238242
};
239243

Diff for: templates/webpack.typescript.js

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target
66
const CleanWebpackPlugin = require("clean-webpack-plugin");
77
const CopyWebpackPlugin = require("copy-webpack-plugin");
88
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
9+
const ExtraWatchWebpackPlugin = require('extra-watch-webpack-plugin');
910
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
1011
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
1112
const TerserPlugin = require("terser-webpack-plugin");
@@ -264,6 +265,9 @@ module.exports = env => {
264265
async: false,
265266
useTypescriptIncrementalApi: true,
266267
memoryLimit: 4096
268+
}),
269+
new ExtraWatchWebpackPlugin({
270+
files: [`node_modules/**/*.${platform}.ts`]
267271
})
268272
],
269273
};

Diff for: templates/webpack.vue.js

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const { join, relative, resolve, sep } = require("path");
33
const webpack = require("webpack");
44
const CleanWebpackPlugin = require("clean-webpack-plugin");
55
const CopyWebpackPlugin = require("copy-webpack-plugin");
6+
const ExtraWatchWebpackPlugin = require('extra-watch-webpack-plugin');
67
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
78
const TerserPlugin = require("terser-webpack-plugin");
89

@@ -258,6 +259,9 @@ module.exports = env => {
258259
}),
259260
// Does IPC communication with the {N} CLI to notify events when running in watch mode.
260261
new nsWebpack.WatchStateLoggerPlugin(),
262+
new ExtraWatchWebpackPlugin({
263+
files: [`node_modules/**/*.${platform}.ts`, `node_modules/**/*.${platform}.js`]
264+
})
261265
],
262266
};
263267

0 commit comments

Comments
 (0)