|
|
@@ -1,12 +1,12 @@
|
|
|
-import resolve from 'rollup-plugin-node-resolve';
|
|
|
-import commonjs from 'rollup-plugin-commonjs';
|
|
|
+// import resolve from 'rollup-plugin-node-resolve';
|
|
|
+// import commonjs from 'rollup-plugin-commonjs';
|
|
|
import typescript from 'rollup-plugin-typescript2'; // 一定要是typescript2,如果使用typescript,没法自动生成.d.ts文件
|
|
|
-import { terser } from 'rollup-plugin-terser';
|
|
|
+// import { terser } from 'rollup-plugin-terser';
|
|
|
import pkg from './package.json';
|
|
|
|
|
|
export default [
|
|
|
// UMD for browser
|
|
|
- {
|
|
|
+ /* {
|
|
|
input: 'src/index.ts',
|
|
|
output: {
|
|
|
name: 'howLongUntilLunch',
|
|
|
@@ -14,7 +14,7 @@ export default [
|
|
|
format: 'umd',
|
|
|
},
|
|
|
plugins: [resolve(), commonjs(), typescript(), terser()], // 浏览器使用的代码文件进行简化
|
|
|
- },
|
|
|
+ }, */
|
|
|
// CommonJS for Node and ES module for bundlers build
|
|
|
{
|
|
|
input: 'src/index.ts',
|
|
|
@@ -22,7 +22,7 @@ export default [
|
|
|
plugins: [typescript()],
|
|
|
output: [
|
|
|
{ file: pkg.main, format: 'cjs' },
|
|
|
- { file: pkg.module, format: 'es' },
|
|
|
+ // { file: pkg.module, format: 'es' },
|
|
|
],
|
|
|
},
|
|
|
];
|