webpack.base.config.js (890B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 3 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 const path = require("path"); 6 const webpack = require("webpack"); 7 8 module.exports = (env = {}) => ({ 9 mode: "none", 10 devtool: env.development ? "inline-source-map" : false, 11 plugins: [ 12 new webpack.BannerPlugin( 13 `THIS FILE IS AUTO-GENERATED: ${path.basename(__filename)}` 14 ), 15 new webpack.optimize.ModuleConcatenationPlugin(), 16 ], 17 module: { 18 rules: [ 19 { 20 test: /\.jsx?$/, 21 exclude: /node_modules\/(?!@fluent\/).*/, 22 loader: "babel-loader", 23 options: { 24 presets: ["@babel/preset-react"], 25 }, 26 }, 27 ], 28 }, 29 resolve: { 30 extensions: [".js", ".jsx", ".mjs"], 31 modules: ["node_modules", "."], 32 }, 33 });