mirror of
https://gitee.com/openharmony/third_party_weex-loader
synced 2024-11-27 01:20:23 +00:00
Signed-off-by: bojiang <jiangbo91@huawei.com> Change-Id: Ifdfd14e6733cd149c196b8a21db8b2e9a0e72478
This commit is contained in:
parent
506088708e
commit
cbefaf2c1a
@ -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 8';
|
||||
}
|
||||
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