Skip to content

Instantly share code, notes, and snippets.

@lhammond
Created April 18, 2016 19:50
Show Gist options
  • Save lhammond/0bb64b2f54320efb005c2ae8f5848d7a to your computer and use it in GitHub Desktop.
Save lhammond/0bb64b2f54320efb005c2ae8f5848d7a to your computer and use it in GitHub Desktop.
var path = require('path');
var paths = require('./ionic.config').paths;
module.exports = {
entry: [
path.normalize('es6-shim/es6-shim.min'),
'reflect-metadata',
path.normalize('zone.js/dist/zone'),
path.resolve('app/app')
],
output: {
path: path.resolve('www/build/js'),
filename: 'app.bundle.js',
pathinfo: false // show module paths in the bundle, handy for debugging
},
module: {
loaders: [
{
test: /\.ts$/,
loader: "awesome-typescript",
query: {
doTypeCheck: true,
resolveGlobs: false,
externals: ["typings/main.d.ts"]
},
include: path.resolve('app'),
exclude: /node_modules/
},
{
test: /\.js$/,
include: path.resolve('node_modules/angular2'),
loader: 'strip-sourcemap'
}
],
noParse: [
/es6-shim/,
/reflect-metadata/,
/zone\.js(\/|\\)dist(\/|\\)zone/
]
},
resolve: {
root: ['app'],
alias: {
'angular2': path.resolve('node_modules/angular2')
},
extensions: ["", ".js", ".ts"]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment