rollup.config.js 882 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. const fs = require('fs')
  2. const PATH = `./.laser-lib-path`
  3. const dir = fs.existsSync(PATH)
  4. ? fs.readFileSync(PATH).toString()
  5. : `build`
  6. export default [
  7. {
  8. input: 'src/Potree.js',
  9. treeshake: false,
  10. output: {
  11. file: `${dir}/potree/potree.js`,
  12. format: 'umd',
  13. name: 'Potree',
  14. sourcemap: true,
  15. }
  16. }, {
  17. input: 'src/workers/BinaryDecoderWorker.js',
  18. output: {
  19. file: `${dir}/potree/workers/BinaryDecoderWorker.js`,
  20. format: 'es',
  21. name: 'Potree',
  22. sourcemap: false
  23. }
  24. },{
  25. input: 'src/modules/loader/2.0/DecoderWorker.js',
  26. output: {
  27. file: `${dir}/potree/workers/2.0/DecoderWorker.js`,
  28. format: 'es',
  29. name: 'Potree',
  30. sourcemap: false
  31. }
  32. },{
  33. input: 'src/modules/loader/2.0/DecoderWorker_brotli.js',
  34. output: {
  35. file: `${dir}/potree/workers/2.0/DecoderWorker_brotli.js`,
  36. format: 'es',
  37. name: 'Potree',
  38. sourcemap: false
  39. }
  40. }
  41. ]