mirror of
https://gitee.com/openharmony/third_party_weex-loader
synced 2024-11-23 07:20:51 +00:00
!106 js中async await片段不转化es5代码配置修改
Merge pull request !106 from Bo Jiang/master
This commit is contained in:
commit
35df3d3507
@ -128,13 +128,17 @@ function scriptLoaderString (loaders, config, customLoader) {
|
||||
loaders = loaders.concat(customLoader)
|
||||
}
|
||||
else {
|
||||
const isTargets = {
|
||||
presets: [loadBabelModule('@babel/preset-env')],
|
||||
plugins: [loadBabelModule('@babel/plugin-transform-modules-commonjs')],
|
||||
comments: 'false'
|
||||
}
|
||||
if (process.env.DEVICE_LEVEL === DEVICE_LEVEL.RICH) {
|
||||
isTargets['targets'] = 'node 14';
|
||||
}
|
||||
loaders.push({
|
||||
name: defaultLoaders.babel,
|
||||
query: {
|
||||
presets: [loadBabelModule('@babel/preset-env')],
|
||||
plugins: [loadBabelModule('@babel/plugin-transform-modules-commonjs')],
|
||||
comments: 'false'
|
||||
}
|
||||
query: isTargets,
|
||||
})
|
||||
loaders.push({
|
||||
name: defaultLoaders.resourceReferenceScript
|
||||
|
Loading…
Reference in New Issue
Block a user