Skip to content

Commit ad13357

Browse files
skyclouds2001luckyadam
authored andcommitted
fix(taro-cli): 修正tsconfig-paths-webpack-plugin插件的导入条件
1 parent 1ccae15 commit ad13357

File tree

1 file changed

+2
-2
lines changed
  • packages/taro-cli/templates/default/config

1 file changed

+2
-2
lines changed

packages/taro-cli/templates/default/config/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineConfig{{#if typescript }}, type UserConfigExport{{/if}} } from '@tarojs/cli'
2-
{{#if typescript }}import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'{{/if}}
2+
{{#if typescript }}{{#unless (eq compiler "Vite")}}import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'{{/unless}}{{/if}}
33
import devConfig from './dev'
44
import prodConfig from './prod'
55

@@ -46,7 +46,7 @@ export default defineConfig{{#if typescript }}<'{{ to_lower_case compiler }}'>{{
4646
generateScopedName: '[name]__[local]___[hash:base64:5]'
4747
}
4848
}
49-
}{{#if typescript }},{{#unless (eq compiler "Vite")}}
49+
},{{#if typescript }}{{#unless (eq compiler "Vite")}}
5050
webpackChain(chain) {
5151
chain.resolve.plugin('tsconfig-paths').use(TsconfigPathsPlugin)
5252
}{{/unless}}{{/if}}

0 commit comments

Comments
 (0)