chore: HMRRuntime injection (wip)

This commit is contained in:
Igor Randjelovic
2021-03-24 17:27:35 +01:00
parent 3a28f9eef6
commit 8855ca4373
13 changed files with 384 additions and 41 deletions

View File

@ -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')