-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
39 lines (36 loc) · 1.16 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
var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
entry: {
react: [
"bootstrap-sass!./src/bootstrap.config.js",
"./src/js/react.js",
],
tests: [
// "./tests/js/path_resolve.js",
]
},
output: {
path: __dirname + "/htdocs/assets/",
filename: "[name].js"
},
module: {
loaders: [
{ test: /bootstrap\/js\//, loader: 'imports?jQuery=jquery' },
{ test: /\.jsx?$/, loader: 'babel-loader', exclude: /node_modules/ },
{ test: /\.css$/, loader: "style!css" },
{ test: /\.woff2?(\?.*)?$/, loader: "url-loader?limit=10000&mimetype=application/font-woff" },
{ test: /\.ttf(\?.*)?$/, loader: "file-loader" },
{ test: /\.eot(\?.*)?$/, loader: "file-loader" },
{ test: /\.svg(\?.*)?$/, loader: "file-loader" },
]
},
plugins: [
new webpack.NoErrorsPlugin(),
new ExtractTextPlugin("./react.css"),
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
})
]
};