| 1 | module.exports = { |
| 2 | optimization: { |
| 3 | minimize: false, |
| 4 | }, |
| 5 | resolveLoader: { |
| 6 | alias: { |
| 7 | fixture: require.resolve("./fixture-loader"), |
| 8 | }, |
| 9 | }, |
| 10 | module: { |
| 11 | rules: [ |
| 12 | { |
| 13 | test: /\.jsx?$/, |
| 14 | include: /\/fixtures\//, |
| 15 | loader: "babel-loader", |
| 16 | options: { |
| 17 | babelrc: false, |
| 18 | presets: [require.resolve("../..")], |
| 19 | plugins: [ |
| 20 | ["@babel/plugin-transform-modules-commonjs", { loose: true }], |
| 21 | ], |
| 22 | }, |
| 23 | }, |
| 24 | { |
| 25 | test: /\.jsx?$/, |
| 26 | loader: "babel-loader", |
| 27 | exclude: /\/fixtures\//, |
| 28 | options: { |
| 29 | babelrc: false, |
| 30 | sourceMap: false, |
| 31 | presets: [ |
| 32 | [ |
| 33 | "@babel/preset-env", |
| 34 | { |
| 35 | targets: { |
| 36 | esmodules: true, |
| 37 | }, |
| 38 | loose: true, |
| 39 | }, |
| 40 | ], |
| 41 | ], |
| 42 | }, |
| 43 | }, |
| 44 | ], |
| 45 | }, |
| 46 | }; |