mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
chore: remove @demo alias
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
getVantConfig,
|
||||
smartOutputFile,
|
||||
normalizePath,
|
||||
isDev,
|
||||
} from '../common';
|
||||
import {
|
||||
SRC_DIR,
|
||||
@@ -79,12 +80,13 @@ function resolveDocuments(components: string[]): DocumentItem[] {
|
||||
|
||||
function genImportDocuments(items: DocumentItem[]) {
|
||||
return items
|
||||
.map(
|
||||
(item) =>
|
||||
`const ${
|
||||
item.name
|
||||
} = defineAsyncComponent(() => import('${normalizePath(item.path)}'));`
|
||||
)
|
||||
.map((item) => {
|
||||
const path = normalizePath(item.path);
|
||||
if (isDev()) {
|
||||
return `const ${item.name} = defineAsyncComponent(() => import('${path}'));`;
|
||||
}
|
||||
return `import ${item.name} from '${path}';`;
|
||||
})
|
||||
.join('\n');
|
||||
}
|
||||
|
||||
|
@@ -18,7 +18,7 @@ type DemoItem = {
|
||||
|
||||
function genInstall() {
|
||||
return `import packageEntry from './package-entry';
|
||||
import './package-style';
|
||||
import './package-style.less';
|
||||
`;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user