Skip to content

Commit dc02fcf

Browse files
author
mazhaobo
committed
build(plugin-manual): 重构构建配置并迁移至 Vite
- 移除 build.json 和 build.plugin.js 文件 - 更新 package.json 中的构建脚本和依赖 - 新增 vite.config.ts 文件配置 Vite 构建 - 调整项目结构,统一入口文件路径
1 parent 4eebda7 commit dc02fcf

File tree

4 files changed

+53
-47
lines changed

4 files changed

+53
-47
lines changed

packages/plugin-manual/build.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

packages/plugin-manual/build.plugin.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

packages/plugin-manual/package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
{
22
"name": "@alilc/lowcode-plugin-manual",
33
"author": "humphry.huang9@gmail.com",
4-
"version": "1.0.4",
4+
"version": "1.1.0-beta.1",
55
"description": "低代码产品使用手册",
6-
"main": "lib/index.js",
7-
"module": "es/index.js",
6+
"main": "dist/index.js",
7+
"module": "dist/index.js",
8+
"types": "dist/index.d.ts",
89
"README": "README.md",
910
"scripts": {
10-
"start": "npm run dev",
11-
"dev": "build-scripts start",
12-
"build": "build-scripts build",
13-
"prepublishOnly": "npm run build",
14-
"beta": "npm publish --tag beta",
15-
"pub": "npm publish"
11+
"start": "vite",
12+
"build": "vite build",
13+
"prepublishOnly": "pnpm run build",
14+
"beta": "pnpm publish --tag beta",
15+
"pub": "pnpm publish"
1616
},
1717
"publishConfig": {
1818
"registry": "https://registry.npmjs.org/",
1919
"access": "public"
2020
},
21-
"dependencies": {},
22-
"peerDependencies": {
21+
"dependencies": {
2322
"react": "^18.3.1"
2423
},
24+
"peerDependencies": {},
2525
"devDependencies": {
26-
"@felce/lowcode-engine": "^1.0.0",
27-
"@alib/build-scripts": "^0.1.32",
28-
"@alifd/theme-lowcode-light": "^0.2.1",
29-
"@types/react": "^18",
30-
"build-plugin-fusion": "^0.1.19",
31-
"@alilc/build-plugin-alt": "^1.0.0"
26+
"@felce/lowcode-engine": "^1.4.0-beta.3",
27+
"@felce/lowcode-types": "^1.5.0-beta.3",
28+
"@types/react": "^18.3.1",
29+
"vite": "^6.0.6",
30+
"@vitejs/plugin-react-swc": "3.7.1",
31+
"vite-plugin-dts": "^4.3.0"
3232
},
3333
"license": "MIT",
3434
"repository": {
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { defineConfig } from 'vite';
2+
import React from '@vitejs/plugin-react-swc';
3+
import dts from 'vite-plugin-dts';
4+
import external from 'vite-plugin-external';
5+
6+
export default defineConfig({
7+
plugins: [
8+
// external({
9+
// externals: {
10+
// react: 'React',
11+
// },
12+
// }),
13+
React({}),
14+
dts(),
15+
],
16+
server: {
17+
port: 4173,
18+
hmr: false,
19+
},
20+
build: {
21+
lib: {
22+
entry: 'src/index.ts',
23+
fileName(format, entryName) {
24+
return `${entryName}.${format}.js`;
25+
},
26+
name: 'LowCodePluginSchema',
27+
cssFileName: 'index',
28+
},
29+
rollupOptions: {
30+
output: {
31+
exports: 'named',
32+
},
33+
external: [],
34+
},
35+
},
36+
});

0 commit comments

Comments
 (0)