提交 45ac7995 编写于 作者: fxy060608's avatar fxy060608

fix: copy

上级 c9027bed
import path from 'path'
import slash from 'slash'
import { Plugin } from 'vite'
import copy from 'rollup-plugin-copy'
import { PUBLIC_DIR } from '@dcloudio/uni-cli-shared'
......@@ -12,11 +13,11 @@ export function uniCopyPlugin({
return copy({
targets: [
{
src: path.resolve(inputDir, PUBLIC_DIR),
src: slash(path.resolve(inputDir, PUBLIC_DIR)),
dest: outputDir,
},
{
src: path.resolve(inputDir, 'uni_modules/*/' + PUBLIC_DIR),
src: slash(path.resolve(inputDir, 'uni_modules/*/' + PUBLIC_DIR)),
dest: outputDir,
rename: (_name, _extension, fullPath) => {
return path.relative(inputDir, fullPath)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册