Advertisement
tha-dude

webpack.config.js

Jan 12th, 2016
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var path = require('path');
  2.  
  3.  
  4. module.exports = {
  5.   devtool: 'source-map',
  6.   entry: [
  7.     path.normalize('es6-shim/es6-shim.min'),
  8.     'reflect-metadata',
  9.     'web-animations.min',
  10.     path.normalize('zone.js/dist/zone-microtask'),
  11.     path.resolve('app/app')
  12.   ],
  13.   output: {
  14.     path: path.resolve('www/build/js'),
  15.     filename: 'app.bundle.js',
  16.     pathinfo: false // show module paths in the bundle, handy for debugging
  17.   },
  18.   module: {
  19.     loaders: [
  20.       {
  21.         test: /\.ts$/,
  22.         loader: 'awesome-typescript',
  23.         query: {
  24.           'doTypeCheck': false
  25.         },
  26.         include: path.resolve('app'),
  27.         exclude: /node_modules/
  28.       },
  29.       {
  30.         test: /\.js$/,
  31.         include: path.resolve('node_modules/angular2'),
  32.         loader: 'strip-sourcemap'
  33.       }
  34.     ],
  35.     noParse: [
  36.       /es6-shim/,
  37.       /reflect-metadata/,
  38.       /web-animations/,
  39.       /zone\.js(\/|\\)dist(\/|\\)zone-microtask/
  40.     ]
  41.   },
  42.   resolve: {
  43.     alias: {
  44.       'web-animations.min': path.normalize('ionic-framework/js/web-animations.min')
  45.     },
  46.     extensions: ["", ".js", ".ts"]
  47.   }
  48. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement