Skip to content

Commit

Permalink
fix(taro-cli): 修正tsconfig-paths-webpack-plugin插件的导入条件
Browse files Browse the repository at this point in the history
  • Loading branch information
skyclouds2001 authored and luckyadam committed Sep 29, 2024
1 parent 1ccae15 commit ad13357
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/taro-cli/templates/default/config/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig{{#if typescript }}, type UserConfigExport{{/if}} } from '@tarojs/cli'
{{#if typescript }}import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'{{/if}}
{{#if typescript }}{{#unless (eq compiler "Vite")}}import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'{{/unless}}{{/if}}
import devConfig from './dev'
import prodConfig from './prod'

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

0 comments on commit ad13357

Please sign in to comment.