File tree Expand file tree Collapse file tree 3 files changed +3
-34
lines changed Expand file tree Collapse file tree 3 files changed +3
-34
lines changed Original file line number Diff line number Diff line change 1- current node
1+ node 12
22last 2 versions and > 2%
33ie > 10
Original file line number Diff line number Diff line change 11const devPresets = [ "@vue/babel-preset-app" ] ;
2- const buildPresets = [
3- [
4- "@babel/preset-env" ,
5- // Config for @babel /preset-env
6- {
7- // Example: Always transpile optional chaining/nullish coalescing
8- // include: [
9- // /(optional-chaining|nullish-coalescing)/
10- // ],
11- } ,
12- ] ,
13- ] ;
2+ const buildPresets = [ [ "@babel/preset-env" ] ] ;
143module . exports = {
154 presets : process . env . NODE_ENV === "development" ? devPresets : buildPresets ,
165} ;
Original file line number Diff line number Diff line change @@ -10,18 +10,6 @@ import babel from "@rollup/plugin-babel";
1010import { terser } from "rollup-plugin-terser" ;
1111import minimist from "minimist" ;
1212
13- // Get browserslist config and remove ie from es build targets
14- const esbrowserslist = fs
15- . readFileSync ( "./.browserslistrc" )
16- . toString ( )
17- . split ( "\n" )
18- . filter ( ( entry ) => entry && entry . substring ( 0 , 2 ) !== "ie" ) ;
19-
20- // Extract babel preset-env config, to combine with esbrowserslist
21- const babelPresetEnvConfig = require ( "../babel.config" ) . presets . filter (
22- ( entry ) => entry [ 0 ] === "@babel/preset-env"
23- ) [ 0 ] [ 1 ] ;
24-
2513const argv = minimist ( process . argv . slice ( 2 ) ) ;
2614
2715const projectRoot = path . resolve ( __dirname , ".." ) ;
@@ -98,15 +86,7 @@ if (!argv.format || argv.format === "es") {
9886 ...baseConfig . plugins . postVue ,
9987 babel ( {
10088 ...baseConfig . plugins . babel ,
101- presets : [
102- [
103- "@babel/preset-env" ,
104- {
105- ...babelPresetEnvConfig ,
106- targets : esbrowserslist ,
107- } ,
108- ] ,
109- ] ,
89+ presets : [ "@babel/preset-env" ] ,
11090 } ) ,
11191 ] ,
11292 } ;
You can’t perform that action at this time.
0 commit comments