-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.example.config.js
53 lines (52 loc) · 1.18 KB
/
webpack.example.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
48
49
50
51
52
53
var path = require("path")
require("./src/server.js")
module.exports = {
entry: [
// 'webpack-dev-server/client?http://0.0.0.0:8080', // WebpackDevServer host and port
// 'webpack/hot/only-dev-server', // "only" prevents reload on syntax errors
"./example/index.jsx",
],
output: {
path: "./example",
filename: "dist/bundle.js",
},
devtool: "inline-source-map",
resolve: {
root: [
path.join(__dirname, "example"),
],
alias: {
"react-storyboard": path.join(__dirname, "./src/index.jsx"),
},
},
devServer: {
contentBase: "./example",
},
module: {
loaders: [
{
test: /\.styl$/,
loader: "style-loader!css-loader!stylus-loader",
},
{
test: /\.css$/,
loader: "style-loader!css-loader",
},
{
test:/\.jsx?$/,
// include: [
// path.resolve(__dirname, "src"),
// path.resolve(__dirname, "example"),
// /react\-redux/,
// ],
loader: 'babel',
},
{
test: /\.woff($|\?)|\.woff2($|\?)|\.ttf($|\?)|\.eot($|\?)|\.svg($|\?)|\.png($|\?)/,
loader: "url-loader",
},
],
},
plugins: [
],
}