forked from opentiny/tiny-vue
fix pnpm build:ui (#116)
This commit is contained in:
parent
2293bde8b7
commit
3f0adf5dbe
|
@ -4,3 +4,5 @@ dist-vue2/
|
|||
dist-vue3/
|
||||
node_modules
|
||||
examples/docs/public/assets/map/js
|
||||
packages/dist2
|
||||
packages/dist3
|
|
@ -7,6 +7,7 @@ dist3/
|
|||
allDist/
|
||||
packages/**/runtime
|
||||
coverage/
|
||||
esbuild-kit/
|
||||
|
||||
/packages/vue-icon-saas/src
|
||||
/packages/vue-icon-saas/index.ts
|
||||
|
|
|
@ -7,7 +7,8 @@ import dtsPlugin from 'vite-plugin-dts'
|
|||
import vue3SvgPlugin from 'vite-svg-loader'
|
||||
import { getAlias, pathFromWorkspaceRoot } from '../../config/vite.js'
|
||||
import * as config from '../../shared/config.js'
|
||||
import { getAllIcons, getAllModules, getByName, Module } from '../../shared/module-utils.js'
|
||||
import type { Module } from '../../shared/module-utils.js'
|
||||
import { getAllIcons, getAllModules, getByName } from '../../shared/module-utils.js'
|
||||
import * as utils from '../../shared/utils.js'
|
||||
import generatePackageJsonPlugin from './rollup/generate-package-json.js'
|
||||
import inlineChunksPlugin from './rollup/inline-chunks.js'
|
||||
|
@ -189,6 +190,9 @@ async function batchBuildAll({ vueVersion, tasks, formats, message, emptyOutDir,
|
|||
if (tasks.length === 0) return
|
||||
utils.logGreen(`====== 开始构建 ${message} ======`)
|
||||
const entry = toEntry(tasks)
|
||||
|
||||
const entryPathSet = new Set(Object.values(entry))
|
||||
|
||||
const dtsInclude = toTsInclude(tasks)
|
||||
await build({
|
||||
configFile: false,
|
||||
|
@ -208,6 +212,12 @@ async function batchBuildAll({ vueVersion, tasks, formats, message, emptyOutDir,
|
|||
return false
|
||||
}
|
||||
|
||||
// 模块作为入口时不需要通过external分离
|
||||
const srcPath = path.resolve(importer, '..', source.split('?')[0])
|
||||
if (entryPathSet.has(srcPath)) {
|
||||
return false
|
||||
}
|
||||
|
||||
// 图标入口排除子图标
|
||||
if (/vue-icon\/(index|lowercase)/.test(importer)) {
|
||||
return /^\.\//.test(source)
|
||||
|
|
Loading…
Reference in New Issue