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

Commit 2a6e203

Browse files
committed
fix: watch platform specific files from node_modules
Rel to: NativeScript/nativescript-cli#4480
1 parent 2fb7d46 commit 2a6e203

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
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",

templates/webpack.javascript.js

Lines changed: 4 additions & 0 deletions
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");
@@ -233,6 +234,9 @@ module.exports = env => {
233234
}),
234235
// Does IPC communication with the {N} CLI to notify events when running in watch mode.
235236
new nsWebpack.WatchStateLoggerPlugin(),
237+
new ExtraWatchWebpackPlugin({
238+
files: [`node_modules/**/*.${platform}.js`]
239+
})
236240
],
237241
};
238242

templates/webpack.typescript.js

Lines changed: 4 additions & 0 deletions
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");
@@ -253,6 +254,9 @@ module.exports = env => {
253254
}),
254255
// Does IPC communication with the {N} CLI to notify events when running in watch mode.
255256
new nsWebpack.WatchStateLoggerPlugin(),
257+
new ExtraWatchWebpackPlugin({
258+
files: [`node_modules/**/*.${platform}.ts`]
259+
})
256260
],
257261
};
258262

templates/webpack.vue.js

Lines changed: 4 additions & 0 deletions
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

@@ -254,6 +255,9 @@ module.exports = env => {
254255
}),
255256
// Does IPC communication with the {N} CLI to notify events when running in watch mode.
256257
new nsWebpack.WatchStateLoggerPlugin(),
258+
new ExtraWatchWebpackPlugin({
259+
files: [`node_modules/**/*.${platform}.ts`, `node_modules/**/*.${platform}.js`]
260+
})
257261
],
258262
};
259263

0 commit comments

Comments
 (0)