rollup.config.js 460 B

1234567891011121314151617181920212223242526
  1. import * as fs from 'fs';
  2. import string from 'rollup-plugin-string';
  3. var outro = `
  4. Object.defineProperty( exports, 'AudioContext', {
  5. get: function () {
  6. return exports.getAudioContext();
  7. }
  8. });`;
  9. var footer = fs.readFileSync( 'src/Three.Legacy.js', 'utf-8' );
  10. export default {
  11. entry: 'src/Three.js',
  12. dest: 'build/three.js',
  13. moduleName: 'THREE',
  14. format: 'umd',
  15. plugins: [
  16. string({
  17. include: '**/*.glsl'
  18. })
  19. ],
  20. outro: outro,
  21. footer: footer
  22. };
粤ICP备19079148号