Skip to content

Commit 53b71ce

Browse files
committed
chore: wip
1 parent 2239df6 commit 53b71ce

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

storage/framework/core/components/stepper/components.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// @ts-nocheck
33
// Generated by unplugin-vue-components
44
// Read more: https://github.com/vuejs/core/pull/3399
5-
export type {}
5+
export {}
66

77
/* prettier-ignore */
88
declare module 'vue' {

storage/framework/core/components/stepper/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
],
4444
"scripts": {
4545
"dev": "bunx --bun vite",
46-
"build": "bunx --bun vite build",
47-
"build:lib": "vite build --mode lib && bun run build:types",
46+
"build": "bunx --bun vite build --mode lib",
47+
"build:demo": "bunx --bun vite build",
4848
"build:types": "bunx --bun vue-tsc -p tsconfig.build.json && api-extractor run",
4949
"preview": "bunx --bun vite preview"
5050
},
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import type { App, Plugin } from 'vue'
2-
32
import { Stepper } from './components'
4-
export { Stepper }
53

64
const plugin: Plugin = {
75
install(app: App) {
86
app.component('Stepper', Stepper)
97
},
108
}
119

10+
export { Stepper }
11+
1212
export default plugin

storage/framework/core/components/stepper/vite.config.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,13 @@ import Components from 'unplugin-vue-components/vite'
99
import type { UserConfig } from 'vite'
1010
import { defineConfig } from 'vite'
1111

12-
const cleanCssInstance = new CleanCSS({})
1312
function minify(code: string) {
13+
const cleanCssInstance = new CleanCSS({})
1414
return cleanCssInstance.minify(code).styles
1515
}
1616

17-
let cssCodeStr = ''
18-
1917
export default defineConfig(({ command, mode }) => {
2018
const userConfig: UserConfig = {}
21-
2219
const commonPlugins = [
2320
Vue({
2421
include: /\.(stx|vue|md)($|\?)/,
@@ -35,18 +32,22 @@ export default defineConfig(({ command, mode }) => {
3532
}),
3633
Icons(),
3734
]
35+
let cssCodeStr = ''
36+
3837

3938
if (mode === 'lib') {
4039
userConfig.build = {
4140
lib: {
42-
entry: resolve(__dirname, 'packages/index.ts'),
41+
entry: resolve(__dirname, 'src/index.ts'),
4342
name: 'StacksStepper',
4443
fileName: 'stacks-stepper',
4544
},
46-
outDir: 'lib',
47-
emptyOutDir: true,
45+
46+
outDir: 'dist',
47+
emptyOutDir: false,
4848
cssCodeSplit: false,
4949
sourcemap: true,
50+
5051
rollupOptions: {
5152
external: ['vue'],
5253
output: [
@@ -62,6 +63,7 @@ export default defineConfig(({ command, mode }) => {
6263
],
6364
},
6465
}
66+
6567
userConfig.plugins = [
6668
...commonPlugins,
6769
{
@@ -77,6 +79,7 @@ export default defineConfig(({ command, mode }) => {
7779
map: { mappings: '' },
7880
}
7981
},
82+
8083
renderChunk(code, { isEntry }) {
8184
if (!isEntry) return
8285

@@ -103,6 +106,7 @@ export default defineConfig(({ command, mode }) => {
103106
resolve: {
104107
alias,
105108
},
109+
106110
plugins: [...commonPlugins],
107111
...userConfig,
108112
}

0 commit comments

Comments
 (0)