mirror of https://github.com/rancher/dashboard.git
Allow HMR in Rancher Components and Harvester
This allows HMR to trigger when changes are made to Rancher Components and Harvester by omitting the `excludes` argument from `getWatcherIgnored()`. Watch and WatchOptions work to allow Webpack to watch files and recompile whenever they change - I don't see any benefit in excluding Rancher Components and Harvester from this process by default. As I understand, the `excludes` variable exists to control production builds; this change will only affect development. Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
This commit is contained in:
parent
b4f393985f
commit
36e7f23102
|
|
@ -456,7 +456,7 @@ const printLogs = (dev, dashboardVersion, resourceBase, routerBasePath, pl, ranc
|
|||
* - as list: [/.shell/, /dist-pkg/, /scripts\/standalone/, /\/pkg.test-pkg/, /\/pkg.harvester/]
|
||||
* - as chained regex rule: /.shell|dist-pkg|scripts\/standalone|\/pkg.test-pkg|\/pkg.harvester/
|
||||
*/
|
||||
const getWatcherIgnored = (excludes) => {
|
||||
const getWatcherIgnored = (excludes = []) => {
|
||||
const paths = [
|
||||
/node_modules/,
|
||||
/dist-pkg/,
|
||||
|
|
@ -557,7 +557,7 @@ module.exports = function(dir, _appConfig) {
|
|||
config.resolve.extensions.push(...['.tsx', '.ts', '.js', '.vue', '.scss']);
|
||||
config.watchOptions = {
|
||||
...(config.watchOptions || {}),
|
||||
ignored: getWatcherIgnored(excludes)
|
||||
ignored: getWatcherIgnored()
|
||||
};
|
||||
|
||||
if (dev) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue