File tree Expand file tree Collapse file tree 2 files changed +40
-26
lines changed Expand file tree Collapse file tree 2 files changed +40
-26
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -35,4 +35,44 @@ module.exports = {
35
35
// https://webpack.js.org/configuration/output/#outputpublicpath
36
36
publicPath : "/" ,
37
37
} ,
38
+
39
+ // Determine how the different types of modules will be treated.
40
+ // https://webpack.js.org/configuration/module
41
+ // https://webpack.js.org/concepts#loaders
42
+ module : {
43
+ rules : [
44
+ {
45
+ test : / \. j s $ / , // Apply this rule to files ending in .js
46
+ exclude : / n o d e _ m o d u l e s / , // Don't apply to files residing in node_modules
47
+ use : {
48
+ // Use the following loader and options
49
+ loader : "babel-loader" ,
50
+ // We can pass options to both babel-loader and Babel. This option object
51
+ // will replace babel.config.js
52
+ options : {
53
+ presets : [
54
+ [
55
+ "@babel/preset-env" ,
56
+ {
57
+ debug : true , // Output the targets/plugins used when compiling
58
+
59
+ // Configure how @babel /preset-env handles polyfills from core-js.
60
+ // https://babeljs.io/docs/en/babel-preset-env
61
+ useBuiltIns : "usage" ,
62
+
63
+ // Specify the core-js version. Must match the version in package.json
64
+ corejs : 3 ,
65
+
66
+ // Specify which environments we support/target for our project.
67
+ // (We have chosen to specify targets in .browserslistrc, so there
68
+ // is no need to do it here.)
69
+ // targets: "",
70
+ } ,
71
+ ] ,
72
+ ] ,
73
+ } ,
74
+ } ,
75
+ } ,
76
+ ] ,
77
+ } ,
38
78
} ;
You can’t perform that action at this time.
0 commit comments