rollup.config.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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/index.js"],
  50. output: [{
  51. file: "dist/extension-core.js",
  52. format: "umd",
  53. name: "extension",
  54. plugins: [terser()]
  55. }]
  56. }, {
  57. input: ["extension/core/content/content.js"],
  58. output: [{
  59. file: "dist/extension.js",
  60. format: "iife",
  61. plugins: [terser()]
  62. }]
  63. }, {
  64. input: ["lib/single-file/processors/hooks/content/content-hooks-web.js"],
  65. output: [{
  66. file: "dist/web/hooks/hooks-web.js",
  67. format: "iife",
  68. plugins: [terser()]
  69. }]
  70. }, {
  71. input: ["lib/single-file/processors/hooks/content/content-hooks-frames-web.js"],
  72. output: [{
  73. file: "dist/web/hooks/hooks-frames-web.js",
  74. format: "iife",
  75. plugins: [terser()]
  76. }]
  77. }, {
  78. input: ["common/ui/content/content-infobar-web.js"],
  79. output: [{
  80. file: "dist/web/infobar-web.js",
  81. format: "iife",
  82. plugins: [terser()]
  83. }]
  84. }, {
  85. input: ["extension/ui/content/content-ui-editor-init-web.js"],
  86. output: [{
  87. file: "dist/web/editor/editor-init-web.js",
  88. format: "iife",
  89. plugins: [terser()]
  90. }]
  91. }, {
  92. input: ["extension/ui/content/content-ui-editor-web.js"],
  93. output: [{
  94. file: "dist/web/editor/editor-web.js",
  95. format: "iife",
  96. plugins: []
  97. }]
  98. }, {
  99. input: ["extension/ui/content/content-ui-editor-helper-web"],
  100. output: [{
  101. file: "dist/web/editor/editor-helper-web.js",
  102. format: "umd",
  103. name: "singlefile",
  104. plugins: [terser()]
  105. }]
  106. }, {
  107. input: ["extension/lib/single-file/browser-polyfill/chrome-browser-polyfill.js"],
  108. output: [{
  109. file: "dist/chrome-browser-polyfill.js",
  110. format: "iife",
  111. plugins: [terser()]
  112. }]
  113. }, {
  114. input: ["extension/core/bg/index.js"],
  115. output: [{
  116. file: "dist/extension-background.js",
  117. format: "iife",
  118. plugins: [terser()]
  119. }]
  120. }, {
  121. input: ["extension/lib/single-file/background.js"],
  122. output: [{
  123. file: "dist/single-file-background.js",
  124. format: "iife",
  125. plugins: [terser()]
  126. }]
  127. }];