rollup.config.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. import { terser } from "rollup-plugin-terser";
  2. export default [{
  3. input: ["lib/single-file/index.js"],
  4. output: [{
  5. file: "dist/single-file.js",
  6. format: "umd",
  7. name: "singlefile",
  8. plugins: [terser()]
  9. }]
  10. }, {
  11. input: ["lib/single-file/single-file-frames.js"],
  12. output: [{
  13. file: "dist/single-file-frames.js",
  14. format: "umd",
  15. name: "singlefile",
  16. plugins: [terser()]
  17. }]
  18. }, {
  19. input: ["lib/single-file/single-file-bootstrap.js"],
  20. output: [{
  21. file: "dist/single-file-bootstrap.js",
  22. format: "umd",
  23. name: "singlefileBootstrap",
  24. plugins: [terser()]
  25. }]
  26. }, {
  27. input: ["common/ui/content/content-infobar.js"],
  28. output: [{
  29. file: "dist/infobar.js",
  30. format: "umd",
  31. name: "infobar",
  32. plugins: [terser()]
  33. }]
  34. }, {
  35. input: ["extension/core/content/content-bootstrap.js"],
  36. output: [{
  37. file: "dist/extension-bootstrap.js",
  38. format: "iife",
  39. plugins: [terser()]
  40. }]
  41. }, {
  42. input: ["extension/core/content/content-frames.js"],
  43. output: [{
  44. file: "dist/extension-frames.js",
  45. format: "iife",
  46. plugins: [terser()]
  47. }]
  48. }, {
  49. input: ["extension/core/content/content.js"],
  50. output: [{
  51. file: "dist/extension.js",
  52. format: "iife",
  53. plugins: [terser()]
  54. }]
  55. }, {
  56. input: ["lib/single-file/processors/hooks/content/content-hooks-web.js"],
  57. output: [{
  58. file: "dist/web/hooks/hooks-web.js",
  59. format: "iife",
  60. plugins: [terser()]
  61. }]
  62. }, {
  63. input: ["lib/single-file/processors/hooks/content/content-hooks-frames-web.js"],
  64. output: [{
  65. file: "dist/web/hooks/hooks-frames-web.js",
  66. format: "iife",
  67. plugins: [terser()]
  68. }]
  69. }, {
  70. input: ["common/ui/content/content-infobar-web.js"],
  71. output: [{
  72. file: "dist/web/infobar-web.js",
  73. format: "iife",
  74. plugins: [terser()]
  75. }]
  76. }, {
  77. input: ["extension/ui/content/content-ui-editor-init-web.js"],
  78. output: [{
  79. file: "dist/web/editor/editor-init-web.js",
  80. format: "iife",
  81. plugins: [terser()]
  82. }]
  83. }, {
  84. input: ["extension/ui/content/content-ui-editor-web.js"],
  85. output: [{
  86. file: "dist/web/editor/editor-web.js",
  87. format: "iife",
  88. plugins: []
  89. }]
  90. }, {
  91. input: ["extension/ui/content/content-ui-editor-helper-web"],
  92. output: [{
  93. file: "dist/web/editor/editor-helper-web.js",
  94. format: "umd",
  95. name: "singlefile",
  96. plugins: []
  97. }]
  98. }, {
  99. input: ["extension/lib/single-file/browser-polyfill/chrome-browser-polyfill.js"],
  100. output: [{
  101. file: "dist/chrome-browser-polyfill.js",
  102. format: "iife",
  103. plugins: [terser()]
  104. }]
  105. }];