mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
chore: HMRRuntime injection (wip)
This commit is contained in:
@ -81,7 +81,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
|
||||
config.watchOptions({
|
||||
ignored: [
|
||||
`${getProjectFilePath('platforms')}/platforms/**`,
|
||||
`${getProjectFilePath('platforms')}/**`,
|
||||
`${env.appResourcesPath ?? getProjectFilePath('App_Resources')}/**`
|
||||
]
|
||||
})
|
||||
@ -137,6 +137,15 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
// resolve symlinks
|
||||
config.resolve.symlinks(true);
|
||||
|
||||
config.module.rule('bundle')
|
||||
.enforce('post')
|
||||
.test(entryPath)
|
||||
.use('nativescript-hot-loader')
|
||||
.loader('nativescript-hot-loader')
|
||||
.options({
|
||||
injectHMRRuntime: true
|
||||
})
|
||||
|
||||
// set up ts support
|
||||
config.module
|
||||
.rule('ts')
|
||||
|
Reference in New Issue
Block a user