提交 680ab818 编写于 作者: fxy060608's avatar fxy060608

wip(app): css

上级 b48c9b59
...@@ -55,7 +55,7 @@ export function uniCssPlugin({ app }: UniCssPluginOptions): Plugin { ...@@ -55,7 +55,7 @@ export function uniCssPlugin({ app }: UniCssPluginOptions): Plugin {
moduleSideEffects: 'no-treeshake', moduleSideEffects: 'no-treeshake',
} }
}, },
buildEnd() { generateBundle() {
const findCssModuleIds = ( const findCssModuleIds = (
moduleId: string, moduleId: string,
cssModuleIds?: Set<string> cssModuleIds?: Set<string>
...@@ -90,8 +90,6 @@ export function uniCssPlugin({ app }: UniCssPluginOptions): Plugin { ...@@ -90,8 +90,6 @@ export function uniCssPlugin({ app }: UniCssPluginOptions): Plugin {
cssChunks.set(normalizeCssChunkFilename(id), findCssModuleIds(id)) cssChunks.set(normalizeCssChunkFilename(id), findCssModuleIds(id))
} }
}) })
},
generateBundle() {
if (!cssChunks.size) { if (!cssChunks.size) {
return return
} }
......
此差异已折叠。
此差异已折叠。
...@@ -57,7 +57,9 @@ async function build(target) { ...@@ -57,7 +57,9 @@ async function build(target) {
const types = target.endsWith('-shared') || (buildTypes && pkg.types) const types = target.endsWith('-shared') || (buildTypes && pkg.types)
// if building a specific format, do not remove dist. // if building a specific format, do not remove dist.
// if (!formats && bundler !== 'vite') { // if (!formats && bundler !== 'vite') {
await fs.remove(`${pkgDir}/dist`) if (target !== 'uni-cloud') {
await fs.remove(`${pkgDir}/dist`)
}
// } // }
const env = devOnly ? 'development' : 'production' const env = devOnly ? 'development' : 'production'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册