mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix: hmr runtime for core/ts
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import Config from 'webpack-chain';
|
||||
|
||||
import { getEntryPath, getEntryDirPath } from "../helpers/platform";
|
||||
import { addVirtualEntry } from '../helpers/virtualModules';
|
||||
import { getEntryDirPath } from "../helpers/platform";
|
||||
import { env as _env, IWebpackEnv } from '../index';
|
||||
import base from './base';
|
||||
|
||||
export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
base(config, env);
|
||||
|
||||
const entryPath = getEntryPath();
|
||||
const filterRE = '/.(xml|js|s?css)$/';
|
||||
const virtualEntryPath = addVirtualEntry(
|
||||
config,
|
||||
@@ -38,6 +38,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
.test(/\.js$/)
|
||||
.exclude
|
||||
.add(/node_modules/)
|
||||
.add(entryPath)
|
||||
.end()
|
||||
.use('nativescript-hot-loader')
|
||||
.loader('nativescript-hot-loader')
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import Config from 'webpack-chain';
|
||||
|
||||
import { getEntryDirPath, getEntryPath } from "../helpers/platform";
|
||||
import { addVirtualEntry } from '../helpers/virtualModules';
|
||||
import { getEntryDirPath } from "../helpers/platform";
|
||||
import { env as _env, IWebpackEnv } from '../index';
|
||||
import base from './base';
|
||||
|
||||
export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
base(config, env);
|
||||
|
||||
const entryPath = getEntryPath();
|
||||
const filterRE = '/.(xml|js|ts|s?css)$/';
|
||||
const virtualEntryPath = addVirtualEntry(
|
||||
config,
|
||||
@@ -38,6 +38,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
.test(/\.(js|ts)$/)
|
||||
.exclude
|
||||
.add(/node_modules/)
|
||||
.add(entryPath)
|
||||
.end()
|
||||
.use('nativescript-hot-loader')
|
||||
.loader('nativescript-hot-loader')
|
||||
|
||||
Reference in New Issue
Block a user