-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
38 lines (37 loc) · 973 Bytes
/
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
var path = require("path");
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
entry: {
app: ["./src/client/index.tsx"]
},
output: {
path: path.resolve(__dirname, "build"),
publicPath: "/assets/",
filename: "bundle.js"
},
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx']
},
module: {
loaders: [
{ test: /\.tsx?$/, loaders: [ { loader: 'ts-loader', query: { configFileName: './src/client/tsconfig.json' } } ]},
{ test: /\.css$/, loader: ExtractTextPlugin.extract({
loader: 'css-loader?camelCase&importLoaders=1&modules&localIdentName=[name]_[local]_[hash:base64:3]!postcss-loader'
})}
]
},
plugins: [
new ExtractTextPlugin('main.css')
],
devServer: {
contentBase: "./public",
inline: true,
proxy: [
{
context: ['/**/*', '!**/*.css', '!**/*.js'],
target: 'http://localhost:3000',
secure: false
}
]
},
};