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');
|
||||
});
|
||||
|
||||
config.merge({
|
||||
experiments: {
|
||||
// enable ES module syntax (import/exports)
|
||||
outputModule: true,
|
||||
},
|
||||
});
|
||||
|
||||
config.output
|
||||
.path(outputPath)
|
||||
.pathinfo(false)
|
||||
.publicPath('')
|
||||
.libraryTarget('commonjs')
|
||||
.set('module', true)
|
||||
.libraryTarget('module')
|
||||
.globalObject('global')
|
||||
.set('clean', true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user