mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-20 07:26:11 +08:00
feat: core-hmr handling & watch ignore
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import Config from 'webpack-chain';
|
||||
|
||||
import { addVirtualEntry } from '../helpers/virtualModules';
|
||||
import { getEntryDirPath } from "../helpers/platform";
|
||||
import { env as _env, IWebpackEnv } from '../index';
|
||||
import base from './base';
|
||||
|
||||
@ -31,5 +32,18 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
.use('xml-namespace-loader')
|
||||
.loader('xml-namespace-loader');
|
||||
|
||||
// set up core HMR
|
||||
config.module
|
||||
.rule('hmr-core')
|
||||
.test(/\.js$/)
|
||||
.exclude
|
||||
.add(/node_modules/)
|
||||
.end()
|
||||
.use('nativescript-hot-loader')
|
||||
.loader('nativescript-hot-loader')
|
||||
.options({
|
||||
appPath: getEntryDirPath()
|
||||
})
|
||||
|
||||
return config;
|
||||
}
|
||||
|
Reference in New Issue
Block a user