fix: hmr runtime for core/ts

This commit is contained in:
Igor Randjelovic
2021-03-28 23:04:15 +02:00
parent 78ad71db6c
commit 0b32d5a88d
4 changed files with 14 additions and 8 deletions

View File

@ -184,7 +184,8 @@ exports[`javascript configuration for android 1`] = `
{
test: /\\\\.js$/,
exclude: [
/node_modules/
/node_modules/,
'__jest__/src/app.js'
],
use: [
/* config.module.rule('hmr-core').use('nativescript-hot-loader') */
@ -503,7 +504,8 @@ exports[`javascript configuration for ios 1`] = `
{
test: /\\\\.js$/,
exclude: [
/node_modules/
/node_modules/,
'__jest__/src/app.js'
],
use: [
/* config.module.rule('hmr-core').use('nativescript-hot-loader') */

View File

@ -184,7 +184,8 @@ exports[`typescript configuration for android 1`] = `
{
test: /\\\\.(js|ts)$/,
exclude: [
/node_modules/
/node_modules/,
'__jest__/src/app.js'
],
use: [
/* config.module.rule('hmr-core').use('nativescript-hot-loader') */
@ -503,7 +504,8 @@ exports[`typescript configuration for ios 1`] = `
{
test: /\\\\.(js|ts)$/,
exclude: [
/node_modules/
/node_modules/,
'__jest__/src/app.js'
],
use: [
/* config.module.rule('hmr-core').use('nativescript-hot-loader') */

View File

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

View File

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