This commit is contained in:
@@ -4,21 +4,21 @@ import { UnifiedWebpackPluginV5 } from 'weapp-tailwindcss/webpack';
|
||||
import { join } from 'node:path';
|
||||
import { argv } from 'yargs';
|
||||
|
||||
const { robot = 1, desc } = argv;
|
||||
|
||||
const CIPluginOptFn = async () => {
|
||||
/**
|
||||
* @typedef { import('@tarojs/plugin-mini-ci').CIOptions } CIOptions
|
||||
* @type {CIOptions}
|
||||
*/
|
||||
|
||||
const parsedArgs = await argv;
|
||||
|
||||
return {
|
||||
weapp: {
|
||||
appid: process.env.TARO_APP_ID,
|
||||
privateKeyPath: process.env.TARO_APP_KEY,
|
||||
robot,
|
||||
robot: parsedArgs.robot || 1,
|
||||
},
|
||||
desc,
|
||||
desc: parsedArgs.desc,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -48,7 +48,7 @@ const config = {
|
||||
framework: 'vue3',
|
||||
compiler: {
|
||||
type: 'webpack5',
|
||||
prebundle: { enable: false },
|
||||
prebundle: { enable: process.env.TARO_ENV === 'h5' },
|
||||
},
|
||||
cache: {
|
||||
enable: false, // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache
|
||||
@@ -98,7 +98,7 @@ const config = {
|
||||
},
|
||||
},
|
||||
cssModules: {
|
||||
enable: true, // 默认为 false,如需使用 css modules 功能,则设为 true
|
||||
enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
|
||||
config: {
|
||||
namingPattern: 'module', // 转换模式,取值为 global/module
|
||||
generateScopedName: '[name]__[local]___[hash:base64:5]',
|
||||
|
||||
Reference in New Issue
Block a user