-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from zh-lx/revert-135-feat-vite
Revert "feat: 打包工具迁移至 vite"
- Loading branch information
Showing
5 changed files
with
81 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import path from 'path'; | ||
import json from '@rollup/plugin-json'; | ||
import { terser } from 'rollup-plugin-terser'; | ||
import { nodeResolve } from '@rollup/plugin-node-resolve'; | ||
import commonjs from '@rollup/plugin-commonjs'; // commonjs模块转换插件 | ||
import cleanup from 'rollup-plugin-cleanup'; | ||
import ts from 'rollup-plugin-typescript2'; | ||
import alias from 'rollup-plugin-alias'; | ||
|
||
const plugins = [ | ||
cleanup(), | ||
json(), | ||
nodeResolve(), | ||
ts({ | ||
tsconfig: path.resolve(__dirname, './tsconfig.json'), // 导入本地ts配置 | ||
clean: true, | ||
useTsconfigDeclarationDir: true, | ||
}), | ||
commonjs(), | ||
alias({ | ||
entries: [{ find: '@', replacement: './lib' }], | ||
}), | ||
terser(), | ||
]; | ||
|
||
module.exports = { | ||
input: path.resolve('./lib/index.ts'), | ||
output: [ | ||
{ | ||
exports: 'auto', | ||
file: path.resolve(__dirname, './dist/index.js'), | ||
format: 'umd', | ||
name: 'pinyinPro', | ||
}, | ||
], | ||
plugins, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import path from 'path'; | ||
import json from '@rollup/plugin-json'; | ||
import { nodeResolve } from '@rollup/plugin-node-resolve'; | ||
import commonjs from '@rollup/plugin-commonjs'; // commonjs模块转换插件 | ||
import ts from 'rollup-plugin-typescript2'; | ||
import alias from 'rollup-plugin-alias'; | ||
|
||
const plugins = [ | ||
json(), | ||
nodeResolve(), | ||
ts({ | ||
tsconfig: path.resolve(__dirname, './tsconfig.json'), // 导入本地ts配置 | ||
clean: true, | ||
useTsconfigDeclarationDir: true, | ||
}), | ||
commonjs(), | ||
alias({ | ||
entries: [{ find: '@', replacement: './lib' }], | ||
}), | ||
]; | ||
|
||
module.exports = { | ||
input: path.resolve('./lib/index.ts'), | ||
output: [ | ||
{ | ||
exports: 'auto', | ||
file: path.resolve(__dirname, './dist/index.mjs'), | ||
format: 'es', | ||
sourcemap: false, | ||
}, | ||
], | ||
plugins, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.