Skip to content

Commit 82c2dce

Browse files
committed
up
1 parent ea1f4fc commit 82c2dce

File tree

13 files changed

+34
-21
lines changed

13 files changed

+34
-21
lines changed

examples/vue-component-bundle/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"devDependencies": {
1212
"@rslib/core": "workspace:*",
13-
"rsbuild-plugin-unplugin-vue": "^0.0.3",
13+
"rsbuild-plugin-unplugin-vue": "^0.0.5",
1414
"typescript": "^5.8.3",
1515
"vue": "^3.5.14",
1616
"vue-tsc": "^2.2.10"

examples/vue-component-bundle/rslib.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ import { pluginUnpluginVue } from 'rsbuild-plugin-unplugin-vue';
44
export default defineConfig({
55
plugins: [pluginUnpluginVue()],
66
lib: [{ format: 'esm' }],
7+
output: {
8+
target: 'web',
9+
},
710
});

examples/vue-component-bundleless/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@storybook/blocks": "^8.6.12",
2222
"@storybook/test": "^8.6.12",
2323
"@storybook/vue3": "^8.6.12",
24-
"rsbuild-plugin-unplugin-vue": "^0.0.3",
24+
"rsbuild-plugin-unplugin-vue": "^0.0.5",
2525
"storybook": "^8.6.12",
2626
"storybook-addon-rslib": "^1.0.1",
2727
"storybook-vue3-rsbuild": "^1.0.1",

examples/vue-component-bundleless/rslib.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ import { pluginUnpluginVue } from 'rsbuild-plugin-unplugin-vue';
44
export default defineConfig({
55
plugins: [pluginUnpluginVue()],
66
lib: [{ bundle: false, format: 'esm' }],
7+
output: {
8+
target: 'web',
9+
},
710
});

pnpm-lock.yaml

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integration/vue/index.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1+
import { platform } from 'node:os';
12
import { join } from 'node:path';
23
import { buildAndGetResults } from 'test-helper';
34
import { describe, expect, test } from 'vitest';
45

5-
describe('ESM', async () => {
6+
// '__file' path can't be normalized on win32.
7+
describe.runIf(platform() !== 'win32')('ESM', async () => {
68
const fixturePath = join(__dirname);
79
const { js, css } = await buildAndGetResults({
810
fixturePath,
911
type: 'all',
1012
});
11-
1213
test('bundle', async () => {
1314
expect(js.contents.esm1).toMatchInlineSnapshot(`
1415
{

tests/integration/vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "module",
66
"devDependencies": {
77
"@rsbuild/plugin-less": "^1.2.4",
8-
"rsbuild-plugin-unplugin-vue": "^0.0.3",
8+
"rsbuild-plugin-unplugin-vue": "^0.0.5",
99
"vue": "^3.5.13"
1010
},
1111
"peerDependencies": {

tests/integration/vue/rslib.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default defineConfig({
1111
plugins: [pluginUnpluginVue()],
1212
bundle: false,
1313
output: {
14+
target: 'web',
1415
distPath: {
1516
root: 'dist/bundleless',
1617
},
@@ -20,6 +21,7 @@ export default defineConfig({
2021
generateBundleEsmConfig({
2122
plugins: [pluginUnpluginVue()],
2223
output: {
24+
target: 'web',
2325
distPath: {
2426
root: 'dist/bundle',
2527
},

website/docs/en/config/rsbuild/plugins.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ Plugins available for React:
3939

4040
Plugins available for Vue:
4141

42-
- [Vue Plugin](https://rsbuild.dev/plugins/list/plugin-vue): Provides support for Vue 3 SFC (Single File Components).
42+
- [Vue Plugin](https://github.com/rspack-contrib/rsbuild-plugin-unplugin-vue): Based on [unplugin-vue](https://github.com/unplugin/unplugin-vue), provides support for Vue 3 SFC (Single File Components).
43+
- [Vue Plugin](https://rsbuild.dev/zh/plugins/list/plugin-vue): Based on [vue-loader](https://github.com/vuejs/vue-loader), provides support for Vue 3 SFC (Single File Components) (Recommend using the implementation based on [unplugin-vue](https://github.com/unplugin/unplugin-vue), as vue-loader is no longer maintained).
4344
- [Vue JSX Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue-jsx): Provides support for Vue 3 JSX / TSX syntax.
4445
- [Vue2 Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue2): Provides support for Vue 2 SFC (Single File Components).
4546
- [Vue2 JSX Plugin](https://github.com/rspack-contrib/rsbuild-plugin-vue2-jsx): Provides support for Vue 2 JSX / TSX syntax.

website/docs/en/guide/advanced/storybook.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,4 @@ Check out more details in the [Storybook Rsbuild documentation](https://storyboo
100100
## Example
101101

102102
- [React component library + Rslib + Storybook](https://github.com/rspack-contrib/storybook-rsbuild/tree/main/sandboxes/rslib-react-component)
103+
- [Vue component library + Rslib + Storybook](https://github.com/rspack-contrib/storybook-rsbuild/tree/main/sandboxes/rslib-vue3-component)

0 commit comments

Comments
 (0)