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