feat: svg

This commit is contained in:
2025-08-18 14:07:34 +08:00
parent 86e14cb445
commit 55b9201c22
13 changed files with 155 additions and 1 deletions

View File

@@ -3,6 +3,8 @@ import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'
import devConfig from './dev'
import prodConfig from './prod'
import vitePluginImp from 'vite-plugin-imp'
import path from 'path'
// https://taro-docs.jd.com/docs/next/config#defineconfig-辅助函数
export default defineConfig<'webpack5'>(async (merge, { command, mode }) => {
const baseConfig: UserConfigExport<'webpack5'> = {
@@ -20,6 +22,16 @@ export default defineConfig<'webpack5'>(async (merge, { command, mode }) => {
plugins: ['@tarojs/plugin-html'],
defineConstants: {
},
alias: {
'@': path.resolve(__dirname, '..', 'src'),
'@/assets': path.resolve(__dirname, '..', 'src/assets'),
'@/components': path.resolve(__dirname, '..', 'src/components'),
'@/utils': path.resolve(__dirname, '..', 'src/utils'),
'@/services': path.resolve(__dirname, '..', 'src/services'),
'@/store': path.resolve(__dirname, '..', 'src/store'),
'@/config': path.resolve(__dirname, '..', 'src/config'),
'@/static': path.resolve(__dirname, '..', 'src/static'),
},
copy: {
patterns: [
],
@@ -29,7 +41,7 @@ export default defineConfig<'webpack5'>(async (merge, { command, mode }) => {
framework: 'react',
compiler: {
type: 'webpack5',
type: 'webpack5',
prebundle: {
enable: false
}