Skip to content

Commit bd389b3

Browse files
committed
fix vercel build for the Vue playground
1 parent d479be5 commit bd389b3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/@headlessui-vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"scripts": {
2323
"playground": "vite serve examples",
24-
"playground:build": "vite build examples",
24+
"playground:build": "NODE_ENV=production vite build examples",
2525
"build": "../../scripts/build.sh",
2626
"test": "../../scripts/test.sh",
2727
"lint": "../../scripts/lint.sh"

packages/@headlessui-vue/vite.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ const TailwindUIPlugin = ({
4848

4949
module.exports = {
5050
alias: {
51-
'/@headlessui/vue/': path.resolve(__dirname, './src/index.ts'),
51+
[process.env.NODE_ENV === 'production' ? '@headlessui/vue' : '/@headlessui/vue/']: path.resolve(
52+
__dirname,
53+
'./src/index.ts'
54+
),
5255
},
5356
configureServer: [TailwindUIPlugin],
5457
}

0 commit comments

Comments
 (0)