@blocklet/component-studio-cli 0.5.6 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/utils/helper.js
CHANGED
|
@@ -9,7 +9,7 @@ import { readdir, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
|
9
9
|
import { join, resolve, dirname, basename, relative } from 'node:path';
|
|
10
10
|
import ora from 'ora';
|
|
11
11
|
import os from 'os';
|
|
12
|
-
const workspaceVersion = '0.1.
|
|
12
|
+
const workspaceVersion = '0.1.4';
|
|
13
13
|
const METADATA_FILE_NAME = '@metadata.json';
|
|
14
14
|
// 获取CLI内置的workspace模板路径
|
|
15
15
|
export function getWorkspaceTemplatePath() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
2
|
import { initBlockStudioPlugins } from '@blocklet/pages-kit-block-studio/plugins';
|
|
3
3
|
import react from '@vitejs/plugin-react';
|
|
4
|
+
import path from 'path';
|
|
4
5
|
import { defineConfig } from 'vite';
|
|
5
6
|
import { createBlockletPlugin } from 'vite-plugin-blocklet';
|
|
6
7
|
import svgr from 'vite-plugin-svgr';
|
|
@@ -21,7 +22,12 @@ export default defineConfig((mode) => {
|
|
|
21
22
|
|
|
22
23
|
resolve: {
|
|
23
24
|
preserveSymlinks: true,
|
|
24
|
-
alias:
|
|
25
|
+
alias: [
|
|
26
|
+
{
|
|
27
|
+
find: /^@blocklet\/pages-kit(\/.*)?$/, // 匹配 @blocklet/pages-kit 及其子路径,确保有统一的上下文,能匹配 component studio 的依赖
|
|
28
|
+
replacement: path.resolve(__dirname, 'node_modules/@blocklet/pages-kit/lib/esm') + '$1',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
25
31
|
},
|
|
26
32
|
|
|
27
33
|
server: {
|