Created
March 3, 2017 09:53
-
-
Save fredv/d5896bbca9c5fb5c4926a47f6cdb43af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webpack = require('webpack') | |
var PROD = (process.env.NODE_ENV === 'production') | |
module.exports = { | |
entry: ["./src/phrase.ts", "./src/directives/phrase_javascript.ts"], | |
output: { | |
filename: PROD ? "angular-phrase.min.js" : "angular-phrase.js", | |
path: __dirname + "/dist" | |
}, | |
devtool: 'source-map', | |
resolve: { | |
extensions: [".webpack.js", ".web.js", ".ts", ".tsx"] | |
}, | |
module: { | |
loaders: [ | |
{ test: /\.tsx?$/, loader: "awesome-typescript-loader", exclude: /node_modules/ }, | |
] | |
}, | |
plugins: PROD ? [ | |
new webpack.optimize.UglifyJsPlugin({ | |
compress: { warnings: false } | |
}) | |
] : [] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment