mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
fix: ngcc default format to use module field
This commit is contained in:
@ -17,6 +17,10 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
|||||||
// remove fork ts checked as not needed
|
// remove fork ts checked as not needed
|
||||||
config.plugins.delete('ForkTsCheckerWebpackPlugin');
|
config.plugins.delete('ForkTsCheckerWebpackPlugin');
|
||||||
|
|
||||||
|
// explicitly define mainFields to make sure ngcc compiles as es2015 (module field)
|
||||||
|
// instead of umd (main field).
|
||||||
|
config.resolve.mainFields.add('module').add('main');
|
||||||
|
|
||||||
config.module
|
config.module
|
||||||
.rule('angular')
|
.rule('angular')
|
||||||
.test(/(?:\.ngfactory.js|\.ngstyle\.js|\.ts)$/)
|
.test(/(?:\.ngfactory.js|\.ngstyle\.js|\.ts)$/)
|
||||||
|
Reference in New Issue
Block a user