Advertisement
Guest User

Untitled

a guest
Oct 9th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. console.log("I'm the Hulk");
  2.  
  3. var nodeResolve = require('rollup-plugin-node-resolve');
  4. var commonjs = require('rollup-plugin-commonjs');
  5. var globals = require('rollup-plugin-node-globals');
  6. var builtins = require('rollup-plugin-node-builtins');
  7. var json = require('rollup-plugin-json');
  8.  
  9.  
  10. // https://github.com/rollup/rollup/wiki/JavaScript-API
  11.  
  12. var rollupConfig = {
  13. /**
  14. * entry: The bundle's starting point. This file will
  15. * be included, along with the minimum necessary code
  16. * from its dependencies
  17. */
  18. entry: 'src/app/main.dev.ts',
  19.  
  20. /**
  21. * sourceMap: If true, a separate sourcemap file will
  22. * be created.
  23. */
  24. sourceMap: true,
  25.  
  26. /**
  27. * format: The format of the generated bundle
  28. */
  29. format: 'iife',
  30.  
  31. /**
  32. * dest: the output filename for the bundle in the buildDir
  33. */
  34. dest: 'main.js',
  35.  
  36. useStrict: false,
  37. /**
  38. * plugins: Array of plugin objects, or a single plugin object.
  39. * See https://github.com/rollup/rollup/wiki/Plugins for more info.
  40. */
  41. plugins: [
  42. builtins(),
  43. commonjs({
  44. include: [
  45. 'node_modules/rxjs/**', // firebase needs rxjs to avoid build errors
  46. 'node_modules/firebase/**', // here we're calling firebase.
  47. 'node_modules/angularfire2/**' // here we're calling angularfire2.
  48. ],
  49. namedExports: {
  50. 'node_modules/firebase/firebase.js': ['initializeApp', 'auth', 'database'],
  51. 'node_modules/angularfire2/node_modules/firebase/firebase-browser.js': ['initializeApp', 'auth', 'database']
  52. }
  53. }),
  54. nodeResolve({
  55. module: true,
  56. jsnext: true,
  57. main: true,
  58. browser: true,
  59. extensions: ['.js']
  60. }),
  61. globals(),
  62. json()
  63. ]
  64.  
  65. };
  66.  
  67.  
  68. if (process.env.IONIC_ENV == 'prod') {
  69. // production mode
  70. rollupConfig.entry = '{{TMP}}/app/main.prod.ts';
  71. rollupConfig.sourceMap = false;
  72. }
  73.  
  74.  
  75. module.exports = rollupConfig;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement