Skip to content

Commit

Permalink
chore: vite 构建产物兼容 es2015 (jd-opensource#2322)
Browse files Browse the repository at this point in the history
  • Loading branch information
blue0728 authored Jun 2, 2023
1 parent 60c0098 commit ec3a737
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions vite.config.build.disperse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default defineConfig({
plugins: [vue()],
build: {
minify: false,
target: 'es2015',
lib: {
entry: '',
name: 'index',
Expand Down
1 change: 1 addition & 0 deletions vite.config.build.locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default defineConfig({
plugins: [vue()],
build: {
minify: true,
target: 'es2015',
lib: {
entry: '',
name: 'index',
Expand Down
1 change: 1 addition & 0 deletions vite.config.build.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default defineConfig({
plugins: [vue()],
build: {
minify: true,
target: 'es2015',
lib: {
entry: path.resolve(__dirname, './src/packages/resolver/index.ts'),
name: 'name',
Expand Down
1 change: 1 addition & 0 deletions vite.config.build.taro.vue.disperse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default defineConfig({
],
build: {
minify: false,
target: 'es2015',
lib: {
entry: '',
name: 'index',
Expand Down
1 change: 1 addition & 0 deletions vite.config.build.taro.vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default defineConfig({
],
build: {
minify: false,
target: 'es2015',
rollupOptions: {
// 请确保外部化那些你的库中不需要的依赖
external: ['vue', 'vue-router', '@tarojs/taro', '@nutui/icons-vue-taro'],
Expand Down
1 change: 1 addition & 0 deletions vite.config.build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default defineConfig({
plugins: [vue()],
build: {
minify: true,
target: 'es2015',
rollupOptions: {
// 请确保外部化那些你的库中不需要的依赖
external: ['vue', 'vue-router'],
Expand Down

0 comments on commit ec3a737

Please sign in to comment.