File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/webpack5/src/configuration Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1- import { merge } from 'webpack-merge' ;
21import Config from 'webpack-chain' ;
32
43import { getProjectFilePath } from '../helpers/project' ;
@@ -19,6 +18,10 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
1918 // electron-main sneaks us past the target == 'node' check and gets us HMR
2019 config . target ( 'electron-main' ) ;
2120
21+ // turns out this isn't enough now. svelte uses "node" of which "electron-main" is a subset in its export map forcing imports
22+ // for 'svelte' to 'ssr.mjs'. We define an alias here to force it back.
23+ config . resolve . alias . set ( 'svelte$' , 'svelte/internal' ) ;
24+
2225 // svelte-hmr still references tns-core-modules, so we shim it here for compat.
2326 config . resolve . alias . set ( 'tns-core-modules' , '@nativescript/core' ) ;
2427
You can’t perform that action at this time.
0 commit comments