-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathwebpack.config.js
41 lines (39 loc) · 1.17 KB
/
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
// webpack.config.js
const path = require('path')
const webpack = require('webpack')
const node_modules = path.resolve(__dirname, 'node_modules')
const pathToReact = path.resolve(node_modules, 'react/dist/react.js')
const config = {
entry: {
demo: [ path.resolve(__dirname, 'demo/demo.js') ],
},
output: {
path: path.resolve(__dirname, 'demo/build'),
filename: '[name].bundle.js'
},
resolve: {
extensions: ['', '.js', '.jsx']
},
module: {
loaders: [
{
test: /\.js?$/,
exclude: /node_modules/,
loaders: ['react-hot', 'babel']
},
{
test: /\.scss$/,
loader: "style!css!sass?outputStyle=expanded=includePaths[]=" + node_modules + "/bootstrap-sass/assets/stylesheets/"
},
{
test: /\.(png|jpg|jpeg|gif|woff|woff2|eot|ttf|svg)$/,
loader: 'url-loader?limit=100000'
},
{
include: /\.json$/, loaders: ["json-loader"],
extensions: ['', '.json', '.jsx', '.js']
}
],
}
}
module.exports = config