-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
35 lines (34 loc) · 1.03 KB
/
webpack.config.js
File metadata and controls
35 lines (34 loc) · 1.03 KB
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
var path = require("path");
var webpack = require("webpack");
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
target: 'node',
context: __dirname,
entry: {
bundle: path.resolve(__dirname, "wwwroot/scripts/app.ts")
},
output: {
path: path.resolve(__dirname, "wwwroot/build/js"),
filename: "bundle.js"
},
// Turn on sourcemaps
devtool: 'source-map',
resolve: {
// Add `.ts` and `.tsx` as a resolvable extension.
extensions: ['', '.webpack.js', '.web.js', '.ts', '.tsx', '.js']
},
module: {
loaders: [
{ test: /\.tsx?$/, loader: 'ts-loader', exclude: "/node_modules/" },
{ test: /\.(scss|sass|css)$/, loader: ExtractTextPlugin.extract("style", "css!sass") }
]
},
plugins: [
//new webpack.optimize.UglifyJsPlugin({
// compress: {
// warnings: false
// }
//}),
new ExtractTextPlugin("../../../wwwroot/build/style/bundle.css")
]
}