Skip to content

Instantly share code, notes, and snippets.

@ben-x9
Created February 25, 2017 09:59
Show Gist options
  • Save ben-x9/31d2427e66b9927acbdb956782c5def7 to your computer and use it in GitHub Desktop.
Save ben-x9/31d2427e66b9927acbdb956782c5def7 to your computer and use it in GitHub Desktop.
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: {
index: ['./app/core'],
},
output: {
publicPath: '/',
filename: 'bundle.js',
},
externals: {
'firebase': 'firebase',
'lodash': '_',
'jsondiffpatch': 'jsondiffpatch',
},
resolve: {
extensions: ['.ts', '.js'],
modules: [path.resolve('./app'), 'node_modules']
},
module: {
loaders: [{
test: /\.ts$/,
loader: 'ts-loader',
options: {
transpileOnly: true
}
}],
},
plugins: [
new webpack.EnvironmentPlugin(['NODE_ENV'])
],
devtool: 'cheap-module-eval-source-map',
devServer: {
host: '0.0.0.0',
contentBase: 'app/core',
historyApiFallback: true,
hot: true,
inline: true,
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment