mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
feat(webpack): add support for .mjs files (#9747)
Co-authored-by: Igor Randjelovic <rigor789@gmail.com>
This commit is contained in:

committed by
GitHub

parent
9c9c831ac0
commit
4fa51b6064
@ -180,6 +180,8 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
.add('.ts')
|
||||
.add(`.${platform}.js`)
|
||||
.add('.js')
|
||||
.add(`.${platform}.mjs`)
|
||||
.add('.mjs')
|
||||
.add(`.${platform}.css`)
|
||||
.add('.css')
|
||||
.add(`.${platform}.scss`)
|
||||
@ -223,7 +225,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
// worker-loader should be declared before ts-loader
|
||||
config.module
|
||||
.rule('workers')
|
||||
.test(/\.(js|ts)$/)
|
||||
.test(/\.(mjs|js|ts)$/)
|
||||
.use('nativescript-worker-loader')
|
||||
.loader('nativescript-worker-loader');
|
||||
|
||||
|
Reference in New Issue
Block a user