-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.server.config.js
32 lines (31 loc) · 1.07 KB
/
webpack.server.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
var path = require("path");
const nodeExternals = require('webpack-node-externals');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
entry: {
app: ["./src/server/index.ts"]
},
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/server/tsconfig.json' } } ]},
{ test: /\.css$/, loader: ExtractTextPlugin.extract({
loader: 'css-loader?camelCase&importLoaders=1&modules&localIdentName=[name]_[local]_[hash:base64:3]!postcss-loader'
})}
// { test: /\.css$/, loaders: [ 'isomorphic-style-loader', 'css-loader?camelCase&importLoaders=1&modules&localIdentName=[name]_[local]_[hash:base64:3]', 'postcss-loader' ] },
// { test: /\.json$/, loaders: [ 'json-loader']}
]
},
plugins: [
new ExtractTextPlugin('main.css')
],
target: 'node',
externals: [nodeExternals()]
};