mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(webpack): enable esm modules as default
This commit is contained in:
@@ -124,11 +124,19 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
|||||||
.add('@nativescript/core/inspector_modules');
|
.add('@nativescript/core/inspector_modules');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
config.merge({
|
||||||
|
experiments: {
|
||||||
|
// enable ES module syntax (import/exports)
|
||||||
|
outputModule: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
config.output
|
config.output
|
||||||
.path(outputPath)
|
.path(outputPath)
|
||||||
.pathinfo(false)
|
.pathinfo(false)
|
||||||
.publicPath('')
|
.publicPath('')
|
||||||
.libraryTarget('commonjs')
|
.set('module', true)
|
||||||
|
.libraryTarget('module')
|
||||||
.globalObject('global')
|
.globalObject('global')
|
||||||
.set('clean', true);
|
.set('clean', true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user