build: 统一构建加入runtime
This commit is contained in:
@@ -3,24 +3,22 @@
|
||||
"name": "@tmagic/react-runtime-help",
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "dist/tmagic-react-runtime-help.umd.cjs",
|
||||
"module": "dist/tmagic-react-runtime-help.js",
|
||||
"types": "types/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js"
|
||||
"types": "./types/index.d.ts",
|
||||
"import": "./dist/tmagic-react-runtime-help.js",
|
||||
"require": "./dist/tmagic-react-runtime-help.umd.cjs"
|
||||
},
|
||||
"./*": "./*"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
"dist",
|
||||
"types"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
"build": "pnpm clean && tsc -b tsconfig.build.json",
|
||||
"clean": "rimraf dist *.tsbuildinfo",
|
||||
"check:type": "tsc --noEmit --project tsconfig.build.json"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
@@ -51,8 +49,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/lodash-es": "^4.17.4",
|
||||
"@types/node": "^18.19.0",
|
||||
"@types/react": "^18.3.3",
|
||||
"rimraf": "^3.0.2"
|
||||
"@types/react": "^18.3.3"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"declaration": true,
|
||||
"sourceMap": false,
|
||||
"types": ["node"],
|
||||
},
|
||||
"include": ["./src"],
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{"root":["./src/AppContent.ts","./src/index.ts","./src/hooks/use-app.ts","./src/hooks/use-dsl.ts","./src/hooks/use-editor-dsl.ts"],"version":"5.6.3"}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"jsx": "react",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"types": ["node"],
|
||||
},
|
||||
}
|
||||
@@ -18,12 +18,6 @@
|
||||
"types"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
"build": "npm run build:type && vite build",
|
||||
"build:type": "npm run clear:type && vue-tsc --declaration --emitDeclarationOnly --project tsconfig.build.json",
|
||||
"clear:type": "rimraf ./types",
|
||||
"type:check": "vue-tsc --noEmit"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
@@ -45,13 +39,5 @@
|
||||
"typescript": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.19.0",
|
||||
"@vitejs/plugin-vue": "^5.2.1",
|
||||
"@vue/compiler-sfc": "^3.5.13",
|
||||
"rimraf": "^3.0.2",
|
||||
"vite": "^6.0.10",
|
||||
"vue-tsc": "^2.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"declarationDir": "types",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {},
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "../..",
|
||||
},
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Tencent is pleased to support the open source community by making TMagicEditor available.
|
||||
*
|
||||
* Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { defineConfig } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
|
||||
import pkg from './package.json';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
|
||||
build: {
|
||||
cssCodeSplit: false,
|
||||
sourcemap: false,
|
||||
minify: false,
|
||||
target: 'esnext',
|
||||
|
||||
lib: {
|
||||
entry: 'src/index.ts',
|
||||
name: 'TMagicFormRuntime',
|
||||
fileName: 'tmagic-form-runtime',
|
||||
},
|
||||
|
||||
rollupOptions: {
|
||||
// 确保外部化处理那些你不想打包进库的依赖
|
||||
external(id: string) {
|
||||
return Object.keys(pkg.peerDependencies).some((k) => new RegExp(`^${k}`).test(id));
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -3,24 +3,22 @@
|
||||
"name": "@tmagic/vue-runtime-help",
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "dist/tmagic-vue-runtime-help.umd.cjs",
|
||||
"module": "dist/tmagic-vue-runtime-help.js",
|
||||
"types": "types/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js"
|
||||
"types": "./types/index.d.ts",
|
||||
"import": "./dist/tmagic-vue-runtime-help.js",
|
||||
"require": "./dist/tmagic-vue-runtime-help.umd.cjs"
|
||||
},
|
||||
"./*": "./*"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
"dist",
|
||||
"types"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
"build": "pnpm clean && tsc -b tsconfig.build.json",
|
||||
"clean": "rimraf dist *.tsbuildinfo",
|
||||
"check:type": "tsc --noEmit --project tsconfig.build.json"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
@@ -53,8 +51,6 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.19.0",
|
||||
"@vue/test-utils": "^2.4.6",
|
||||
"rimraf": "^3.0.2"
|
||||
"@vue/test-utils": "^2.4.6"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"declaration": true,
|
||||
"sourceMap": false,
|
||||
"types": ["node"],
|
||||
},
|
||||
"include": ["./src"],
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{"root":["./src/index.ts","./src/hooks/use-app.ts","./src/hooks/use-component.ts","./src/hooks/use-dsl.ts","./src/hooks/use-editor-dsl.ts"],"version":"5.6.3"}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"types": ["node"],
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user