create-bc-app 1.1.8 → 1.1.9
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/package.json +1 -1
- package/template-monorepo/apps/App-A/tsconfig.json +2 -1
- package/template-monorepo/apps/App-A/tsconfig.node.json +1 -1
- package/template-monorepo/apps/App-A/vite.config.ts +3 -9
- package/template-monorepo/config/resolve.config.ts +5 -3
- package/template-monorepo/package.json +1 -1
- package/template-monorepo/packages/PKG-A/tsconfig.json +3 -1
- package/template-monorepo/packages/PKG-A/vite.config.ts +18 -13
- package/template-monorepo/packages/PKG-B/tsconfig.json +3 -1
- package/template-monorepo/packages/PKG-B/vite.config.ts +18 -13
- package/template-monorepo/tsconfig.json +3 -1
- package/template-monorepo/tsconfig.node.json +1 -1
- package/template-monorepo/vite-env.d.ts +1 -1
package/package.json
CHANGED
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
"baseUrl": ".",
|
|
8
8
|
"outDir": "./dist",
|
|
9
9
|
"rootDir": "../../",
|
|
10
|
+
"typeRoots": ["../../"],
|
|
10
11
|
"paths": {
|
|
11
|
-
"
|
|
12
|
+
"@app-a/*":["src/*"],
|
|
12
13
|
"@fs/utils": ["../../node_modules/@fscut/fs-utils"],
|
|
13
14
|
"@fs/bochui": ["../../node_modules/@fscut/bochui"],
|
|
14
15
|
"@fs/element-plus": ["../../node_modules/@fscut/element-plus"]
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/// <reference types="vitest" />
|
|
2
2
|
import { defineConfig } from 'vite'
|
|
3
|
-
import { fileURLToPath, URL } from 'node:url'
|
|
4
3
|
import vue from '@vitejs/plugin-vue'
|
|
4
|
+
import resolveConfig from '../../config/resolve.config'
|
|
5
5
|
|
|
6
6
|
// https://vitejs.dev/config/
|
|
7
7
|
// @ts-ignore
|
|
8
8
|
export default defineConfig(({ mode }) => {
|
|
9
9
|
console.log('Build Mode:', mode)
|
|
10
|
+
const pkg = mode === 'production' ? '@fscut' : '@fsdev'
|
|
10
11
|
return {
|
|
11
12
|
plugins: [
|
|
12
13
|
vue()
|
|
@@ -35,14 +36,7 @@ export default defineConfig(({ mode }) => {
|
|
|
35
36
|
esbuild: {
|
|
36
37
|
drop: mode === 'production' ? ['console', 'debugger'] : []
|
|
37
38
|
},
|
|
38
|
-
resolve:
|
|
39
|
-
alias: {
|
|
40
|
-
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
41
|
-
'@fs/element-plus': fileURLToPath(new URL('../../node_modules/@fscut/element-plus', import.meta.url)),
|
|
42
|
-
'@fs/bochui': fileURLToPath(new URL('../../node_modules/@fscut/bochui', import.meta.url)),
|
|
43
|
-
'@fs/utils': fileURLToPath(new URL('../../node_modules/@fscut/fs-utils', import.meta.url))
|
|
44
|
-
}
|
|
45
|
-
}
|
|
39
|
+
resolve: resolveConfig(pkg)
|
|
46
40
|
}
|
|
47
41
|
})
|
|
48
42
|
|
|
@@ -4,9 +4,11 @@ export default (pkg: string) => {
|
|
|
4
4
|
console.log(pkg)
|
|
5
5
|
return {
|
|
6
6
|
alias: {
|
|
7
|
-
'@': fileURLToPath(new URL('
|
|
8
|
-
'@
|
|
9
|
-
'@
|
|
7
|
+
'@pkg-a': fileURLToPath(new URL('../packages/PKG-A/src', import.meta.url)),
|
|
8
|
+
'@pkg-b': fileURLToPath(new URL('../packages/PKG-B/src', import.meta.url)),
|
|
9
|
+
'@app-a': fileURLToPath(new URL('../apps/APP-A/src', import.meta.url)),
|
|
10
|
+
'@fs/element-plus': fileURLToPath(new URL('../node_modules/@fscut/element-plus', import.meta.url)),
|
|
11
|
+
'@fs/bochui': fileURLToPath(new URL('../node_modules/@fscut/bochui', import.meta.url))
|
|
10
12
|
}
|
|
11
13
|
}
|
|
12
14
|
}
|
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
"noEmit": false,
|
|
6
6
|
"emitDeclarationOnly": true,
|
|
7
7
|
"rootDir": "../../",
|
|
8
|
+
"typeRoots": ["../../"],
|
|
8
9
|
"outDir": "./lib",
|
|
9
10
|
"baseUrl": ".",
|
|
10
11
|
"paths": {
|
|
12
|
+
"@pkg-a/*": ["./src/*"],
|
|
11
13
|
"@fs/utils": ["../../node_modules/@fscut/fs-utils"]
|
|
12
14
|
}
|
|
13
15
|
},
|
|
14
|
-
"include": ["src"],
|
|
16
|
+
"include": ["src", "./index.ts", "**/*.json"],
|
|
15
17
|
}
|
|
@@ -2,21 +2,26 @@ import { defineConfig } from 'vite'
|
|
|
2
2
|
import dts from 'vite-plugin-dts'
|
|
3
3
|
import { resolve } from 'path'
|
|
4
4
|
import buildConfig from '../../config/build.config'
|
|
5
|
+
import resolveConfig from '../../config/resolve.config'
|
|
5
6
|
const __dirname = resolve()
|
|
6
7
|
|
|
7
|
-
export default defineConfig({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
export default defineConfig(({ mode }) => {
|
|
9
|
+
const pkg = mode === 'production' ? '@fscut' : '@fsdev'
|
|
10
|
+
return {
|
|
11
|
+
plugins: [dts({ rollupTypes: true })],
|
|
12
|
+
build: {
|
|
13
|
+
outDir: './lib',
|
|
14
|
+
rollupOptions: {
|
|
15
|
+
// 确保外部化处理那些你不想打包进库的依赖
|
|
16
|
+
external: buildConfig.rollupOptions.external
|
|
17
|
+
},
|
|
18
|
+
lib: {
|
|
19
|
+
entry: resolve(__dirname, './index.ts'),
|
|
20
|
+
name: 'PKG-A',
|
|
21
|
+
fileName: 'index',
|
|
22
|
+
formats: ['es']
|
|
23
|
+
}
|
|
14
24
|
},
|
|
15
|
-
|
|
16
|
-
entry: resolve(__dirname, './index.ts'),
|
|
17
|
-
name: 'PKG-B',
|
|
18
|
-
fileName: 'index',
|
|
19
|
-
formats: ['es']
|
|
20
|
-
}
|
|
25
|
+
resolve: resolveConfig(pkg)
|
|
21
26
|
}
|
|
22
27
|
})
|
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
"noEmit": false,
|
|
6
6
|
"emitDeclarationOnly": true,
|
|
7
7
|
"rootDir": "../../",
|
|
8
|
+
"typeRoots": ["../../"],
|
|
8
9
|
"outDir": "./lib",
|
|
9
10
|
"baseUrl": ".",
|
|
10
11
|
"paths": {
|
|
12
|
+
"@pkg-b/*": ["./src/*"],
|
|
11
13
|
"@fs/utils": ["../../node_modules/@fscut/fs-utils"]
|
|
12
14
|
}
|
|
13
15
|
},
|
|
14
|
-
"include": ["src"],
|
|
16
|
+
"include": ["src", "./index.ts", "**/*.json"],
|
|
15
17
|
}
|
|
@@ -2,21 +2,26 @@ import { defineConfig } from 'vite'
|
|
|
2
2
|
import dts from 'vite-plugin-dts'
|
|
3
3
|
import { resolve } from 'path'
|
|
4
4
|
import buildConfig from '../../config/build.config'
|
|
5
|
+
import resolveConfig from '../../config/resolve.config'
|
|
5
6
|
const __dirname = resolve()
|
|
6
7
|
|
|
7
|
-
export default defineConfig({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
export default defineConfig(({ mode }) => {
|
|
9
|
+
const pkg = mode === 'production' ? '@fscut' : '@fsdev'
|
|
10
|
+
return {
|
|
11
|
+
plugins: [dts({ rollupTypes: true })],
|
|
12
|
+
build: {
|
|
13
|
+
outDir: './lib',
|
|
14
|
+
rollupOptions: {
|
|
15
|
+
// 确保外部化处理那些你不想打包进库的依赖
|
|
16
|
+
external: buildConfig.rollupOptions.external
|
|
17
|
+
},
|
|
18
|
+
lib: {
|
|
19
|
+
entry: resolve(__dirname, './index.ts'),
|
|
20
|
+
name: 'PKG-B',
|
|
21
|
+
fileName: 'index',
|
|
22
|
+
formats: ['es']
|
|
23
|
+
}
|
|
14
24
|
},
|
|
15
|
-
|
|
16
|
-
entry: resolve(__dirname, './index.ts'),
|
|
17
|
-
name: 'PKG-B',
|
|
18
|
-
fileName: 'index',
|
|
19
|
-
formats: ['es']
|
|
20
|
-
}
|
|
25
|
+
resolve: resolveConfig(pkg)
|
|
21
26
|
}
|
|
22
27
|
})
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
"composite": true,
|
|
4
4
|
"baseUrl": "./",
|
|
5
5
|
"paths": {
|
|
6
|
-
"@/*":["src/*"],
|
|
7
6
|
"@fs/utils": ["./node_modules/@fscut/fs-utils"],
|
|
8
7
|
"@fs/bochui": ["./node_modules/@fscut/bochui"]
|
|
9
8
|
},
|
|
9
|
+
"types": [
|
|
10
|
+
"./vite-env.d.ts"
|
|
11
|
+
],
|
|
10
12
|
"target": "ES2020",
|
|
11
13
|
"declaration": true,
|
|
12
14
|
"declarationDir": "lib",
|