提交 4fdaf207 编写于 作者: fxy060608's avatar fxy060608

fix: normalize public filter

上级 45ac7995
import path from 'path'
import slash from 'slash'
import { createFilter } from '@rollup/pluginutils'
import { PUBLIC_DIR } from '@dcloudio/uni-cli-shared'
export function createPublicFileFilter(base: string = '/') {
const publicDir = path.join(base, PUBLIC_DIR + '/**/*')
const uniModulesDir = path.join(base, 'uni_modules/*/' + PUBLIC_DIR + '/**/*')
const publicDir = slash(path.join(base, PUBLIC_DIR + '/**/*'))
const uniModulesDir = slash(
path.join(base, 'uni_modules/*/' + PUBLIC_DIR + '/**/*')
)
return createFilter([publicDir, uniModulesDir])
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册