开发
web-frontend
build-tools
module-bundler
rollup
Index

rollup

rollup + ts 实现打包

npm install rollup typescript @rollup/plugin-typescript tslib -D

配置 rollup.config.js

import typescript from "@rollup/plugin-typescript";
 
/**
 * @type {import("rollup").RollupOptions}
 */
 
const config = {
  input: "src/code.ts",
  output: {
    dir: "dist",
  },
  plugins: [typescript()],
};
 
export default config;