Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. bundle.js:1 Uncaught ReferenceError: exports is not defined
  2.  
  3. {
  4. "compilerOptions": {
  5. "target": "es5",
  6. "module": "es2015",
  7. "moduleResolution": "node",
  8. "sourceMap": true,
  9. "emitDecoratorMetadata": true,
  10. "experimentalDecorators": true,
  11. "lib": ["es2015", "dom"],
  12. "noImplicitAny": true,
  13. "suppressImplicitAnyIndexErrors": true
  14. },
  15.  
  16. "files": [
  17. "src/main.ts"
  18. ],
  19.  
  20. "angularCompilerOptions": {
  21. "genDir": "aot",
  22. "skipMetadataEmit" : true
  23. },
  24. "exclude": [
  25. "node_modules",
  26. "bower_components",
  27. "typings/main",
  28. "typings/main.d.ts"
  29. ]
  30. }
  31.  
  32. import { platformBrowser } from '@angular/platform-browser';
  33. import { AppModuleNgFactory } from '../aot/src/app/app.module.ngfactory';
  34. console.log('Running AOT compiled');
  35. platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
  36.  
  37. {
  38. "compilerOptions": {
  39. "target": "es5",
  40. "module": "es2015",
  41. "moduleResolution": "node",
  42. "sourceMap": true,
  43. "emitDecoratorMetadata": true,
  44. "experimentalDecorators": true,
  45. "lib": ["es2015", "dom"],
  46. "noImplicitAny": true,
  47. "suppressImplicitAnyIndexErrors": true
  48. },
  49.  
  50. "files": [
  51. "src/main.ts"
  52. ],
  53.  
  54. "angularCompilerOptions": {
  55. "genDir": "aot",
  56. "skipMetadataEmit" : true
  57. },
  58. "exclude": [
  59. "node_modules",
  60. "bower_components",
  61. "typings/main",
  62. "typings/main.d.ts"
  63. ]
  64. }
  65.  
  66. import rollup from 'rollup'
  67. import nodeResolve from 'rollup-plugin-node-resolve'
  68. import commonjs from 'rollup-plugin-commonjs';
  69. import uglify from 'rollup-plugin-uglify'
  70.  
  71. export default {
  72. entry: 'src/main.js',
  73. dest: 'bundle.js', // output a single application bundle
  74. sourceMap: false,
  75. format: 'iife',
  76. onwarn: function(warning) {
  77. // Skip certain warnings
  78. // should intercept ... but doesn't in some rollup versions
  79. if ( warning.code === 'THIS_IS_UNDEFINED' ) { return; }
  80. // console.warn everything else
  81. console.warn( warning.message );
  82. },
  83. plugins: [
  84. nodeResolve({jsnext: true, module: true}),
  85. commonjs({
  86. include: 'node_modules/rxjs/**',
  87. }),
  88. uglify()
  89. ]
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement