-
Notifications
You must be signed in to change notification settings - Fork 1
/
base.webpack.config.js
47 lines (45 loc) · 1017 Bytes
/
base.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
39
40
41
42
43
44
45
46
47
/* eslint-disable import/no-extraneous-dependencies */
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const rupture = require('rupture');
module.exports = {
entry: {
app: [ './src/main.js' ],
blog: [ './src/blog.js' ],
code: [ './src/entries/code.js' ]
},
output: {
path: path.join(__dirname, '../dist'),
filename: '[name].js'
},
module: {
loaders: [
{
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
},
{ test: /\.js$/, loader: 'babel' },
{
test: /\.styl$/,
loader: ExtractTextPlugin.extract(
'style-loader', 'css-loader!stylus-loader'
)
}
]
},
stylus: {
use: [
rupture()
],
import: [
'~rupture/rupture/index.styl',
],
},
externals: {
'React': 'react'
},
plugins: [
new ExtractTextPlugin('[name].css')
]
};