webpack.config.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. var path = require('path');
  2. var paths = require('./ionic.config').paths;
  3. module.exports = {
  4. entry: [
  5. 'es6-shim/es6-shim.min',
  6. 'reflect-metadata',
  7. 'web-animations.min',
  8. 'zone.js',
  9. path.join(__dirname, paths.wwwDir, paths.appDir, paths.appSrcModule)
  10. ],
  11. output: {
  12. path: path.join(__dirname, paths.wwwDir, paths.buildDir, paths.buildJSDir),
  13. filename: paths.appBuildBundle,
  14. publicPath: path.join(paths.buildDir, paths.buildJSDir),
  15. pathinfo: false // show module paths in the bundle, handy for debugging
  16. },
  17. module: {
  18. loaders: [
  19. {
  20. test: /\.ts$/,
  21. loader: 'awesome-typescript',
  22. query: {
  23. 'doTypeCheck': false
  24. },
  25. include: [path.join(__dirname, paths.wwwDir)],
  26. exclude: /node_modules/
  27. },
  28. {
  29. test: /\.js$/,
  30. include: /node_modules\/angular2/,
  31. loader: 'strip-sourcemap'
  32. }
  33. ]
  34. },
  35. resolve: {
  36. alias: {
  37. 'web-animations.min': 'ionic-framework/js/web-animations.min',
  38. },
  39. extensions: ["", ".js", ".ts"]
  40. }
  41. };