-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
41 lines (38 loc) · 844 Bytes
/
webpack.config.js
File metadata and controls
41 lines (38 loc) · 844 Bytes
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
39
40
41
const webpack = require('webpack');
const config = {
context: __dirname,
entry: {
example: './example/Index.jsx'
},
output: {
filename: '[name].js',
publicPath: '/static/'
},
resolve: {
extensions: ['.js', '.jsx']
},
module: {
rules: [
{ test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/ },
{ test: /\.(png|jpg|gif)$/, loader: 'url-loader?limi1t=2500' },
{
test: /\.scss|\.css$/,
loader: 'style-loader!css-loader?modules&localIdentName=[name]-[local]--[hash:base64:8]!postcss-loader!sass-loader'
}
]
},
plugins: [
new webpack.LoaderOptionsPlugin({
options: {
postcss: [
require('postcss-cssnext')
]
}
})
],
devServer: {
port: 8080
},
devtool: 'source-map'
};
module.exports = config;