UNPKG

954 BJavaScriptView Raw
1var webpack = require('webpack');
2var path = require('path');
3
4module.exports = {
5 entry: './src/browser.js',
6 output: {
7 path: path.join(__dirname, '../build'),
8 filename: 'lock.js'
9 },
10 resolve: {
11 extensions: ['.webpack.js', '.web.js', '.js', '.jsx', '.styl']
12 },
13 progress: true,
14 watch: true,
15 watchOptions: {
16 aggregateTimeout: 500,
17 poll: true
18 },
19 inline: true,
20 stats: {
21 colors: true,
22 modules: true,
23 reasons: true
24 },
25 module: {
26 rules: [
27 {
28 test: /\.jsx?$/,
29 loader: 'babel-loader',
30 exclude: path.join(__dirname, 'node_modules')
31 },
32 {
33 test: /\.styl$/,
34 use: [
35 'css-loader',
36 'stylus-loader',
37 {
38 loader: 'stylus-loader',
39 options: {
40 paths: ['node_modules/bootstrap-stylus/stylus'],
41 preferPathResolver: 'webpack'
42 }
43 }
44 ]
45 }
46 ]
47 }
48};