diff --git a/src/loader.js b/src/loader.js index 123d7338a1e7e56468d6e5f59a35776664562f71..2f41b821fae11127a923f32e6b3e25361416f96b 100644 --- a/src/loader.js +++ b/src/loader.js @@ -128,17 +128,13 @@ 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: isTargets, + query: { + presets: [loadBabelModule('@babel/preset-env')], + plugins: [loadBabelModule('@babel/plugin-transform-modules-commonjs')], + comments: 'false' + } }) loaders.push({ name: defaultLoaders.resourceReferenceScript