diff --git a/utils/package.json b/utils/package.json index 273232e..90b4f9d 100644 --- a/utils/package.json +++ b/utils/package.json @@ -29,6 +29,7 @@ "generate:type-2": "tsc -p tsconfig.json --composite false --declaration true --emitDeclarationOnly true", "generate:type-3": "vue-tsc -p tsconfig.types.json", "get-type": "pnpm clean:type && pnpm generate:type-3", + "build:-try-1": "pnpm clean:type && vue-tsc -p tsconfig.build.json", "rm:node_modules": "rimraf node_modules" }, "exports": { diff --git a/utils/tsconfig.build.json b/utils/tsconfig.build.json new file mode 100644 index 0000000..c168fb3 --- /dev/null +++ b/utils/tsconfig.build.json @@ -0,0 +1,26 @@ +{ + // 打包成js的配置 + // https://segmentfault.com/a/1190000044599569 + "extends": [ + // "./tsconfig.json" + ], + "compilerOptions": { + // 项目的根目录 + "rootDir": ".", + // 项目基础目录 + "baseUrl": "./src", + // tsc 编译产物输出目录 + "outDir": "dist", + "target": "ES2015", + "module": "commonjs", + // 模块解析策略 + // "moduleResolution": "ESNext", + "composite": false, + "declaration": true, + "noEmit": false, + "emitDeclarationOnly": false, + "declarationMap": true, + "allowJs": true, + // "allowImportingTsExtensions": true + }, +} \ No newline at end of file