-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.production.config.js
36 lines (34 loc) · 1.17 KB
/
webpack.production.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
var path = require('path');
var node_modules_dir = path.resolve(__dirname, 'node_modules');
module.exports = {
entry: path.resolve(__dirname, 'app/index.jsx'),
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'sr-quote-widget.js', //this is the default name, so you can skip it
//at this directory our bundle file will be available
//make sure port 8090 is used when launching webpack-dev-server
vendors: ['react']
},
module: {
loaders: [
{
//tell webpack to use jsx-loader for all *.jsx files
test: /\.jsx$/,
loader: 'jsx-loader?insertPragma=React.DOM&harmony'
//exclude: [node_modules_dir]
},
// SASS
{
test: /\.scss$/,
loader: 'style!css!sass'
},
{ test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "url-loader?limit=10000&minetype=application/font-woff" },
{ test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader" }
]
},
externals: {
},
resolve: {
extensions: ['', '.js', '.jsx']
}
}