-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.config.js
39 lines (32 loc) · 996 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const path = require('path');
// can also use an array of configurations [{}, ..., {}]
module.exports = {
// mode: "production", // enable many optimizations for production builds
mode: "development", // enabled useful tools for development
// devtool: "nosources-source-map", // enables stack traces but disables sources
devtool: "source-map", // enables stack traces but disables sources
entry: {
tabs: "./src/js/tabs.jsx",
options: "./src/js/options.js"
},
output: {
path: path.resolve(__dirname, "tabist/"),
filename: "[name].js"
},
//https://blog.usejournal.com/creating-a-react-app-from-scratch-f3c693b84658
module: {
rules: [
{
test: /\.css$/,
use: [ 'style-loader', 'css-loader' ]
},
{
test: /\.(js|jsx)$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
options: { presets: ['env']}
}
]
},
resolve: { extensions: ['*', '.js', '.jsx'] },
};