This commit is contained in:
2023-08-30 14:19:23 +08:00
parent 90225f68e0
commit 0c342378c3
25 changed files with 2066 additions and 2218 deletions

View File

@@ -4,7 +4,7 @@ import devConfig from './dev'
import prodConfig from './prod'
// https://taro-docs.jd.com/docs/next/config#defineconfig-辅助函数
export default defineConfig(async (merge, { command, mode }) => {
export default defineConfig(async (merge, {}) => {
const baseConfig: UserConfigExport = {
projectName: 'newGameHome',
date: '2023-8-29',
@@ -29,7 +29,7 @@ export default defineConfig(async (merge, { command, mode }) => {
framework: 'vue3',
compiler: 'webpack5',
cache: {
enable: false // Webpack 持久化缓存配置建议开启。默认配置请参考https://docs.taro.zone/docs/config-detail#cache
enable: true // Webpack 持久化缓存配置建议开启。默认配置请参考https://docs.taro.zone/docs/config-detail#cache
},
mini: {
postcss: {
@@ -60,6 +60,9 @@ export default defineConfig(async (merge, { command, mode }) => {
h5: {
publicPath: '/',
staticDirectory: 'static',
router: {
mode: 'browser'
},
output: {
filename: 'js/[name].[hash:8].js',
chunkFilename: 'js/[name].[chunkhash:8].js'
@@ -75,7 +78,7 @@ export default defineConfig(async (merge, { command, mode }) => {
config: {}
},
cssModules: {
enable: false, // 默认为 false如需使用 css modules 功能,则设为 true
enable: true, // 默认为 false如需使用 css modules 功能,则设为 true
config: {
namingPattern: 'module', // 转换模式,取值为 global/module
generateScopedName: '[name]__[local]___[hash:base64:5]'