forked from glennflanagan/react-collapsible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.babel.js
46 lines (43 loc) · 1001 Bytes
/
webpack.config.babel.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
39
40
41
42
43
44
45
46
import path from 'path';
import autoprefixer from 'autoprefixer';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
const postcss = {
loader: 'postcss-loader',
options: {
plugins() { return [autoprefixer({ browsers: 'last 3 versions' })]; },
sourceMap: true,
}
};
const styles = {
test: /\.(scss)$/,
use: ExtractTextPlugin.extract(['css-loader?sourceMap', postcss, 'sass-loader?sourceMap'])
};
module.exports = {
entry: './example/_src/js/index.js',
output: {
filename: 'example/build/app.js',
},
module: {
rules: [{
test: /\.js$/,
exclude: /(node_modules)/,
use: [{
loader: 'babel-loader',
options: {
presets: [['es2015', {modules: false}]],
}
}]
},
styles],
},
plugins: [
new ExtractTextPlugin('styles.css'),
],
devtool: 'inline-source-map',
devServer: {
contentBase: path.join(__dirname, "example/build"),
compress: true,
port: 9000,
open: true,
},
};