rollup.config.js 636 B

12345678910111213141516171819202122232425
  1. import server from "rollup-plugin-server";
  2. import babel from "rollup-plugin-babel";
  3. import compiler from "@ampproject/rollup-plugin-closure-compiler";
  4. import rollupTypescript from 'rollup-plugin-typescript2';
  5. export default {
  6. input: "src/index.ts",
  7. output: {
  8. file: "dist/index.js",
  9. format: "umd",
  10. name: "AMapLoader",
  11. },
  12. plugins: [
  13. rollupTypescript(),
  14. babel({
  15. presets: [["@babel/env", { targets: { ie: 9 } }]],
  16. }),
  17. compiler(),
  18. server({
  19. contentBase: "./",
  20. host: "127.0.0.1",
  21. port: 3601,
  22. }),
  23. ],
  24. };