storybook-vue3-rsbuild 0.1.6 → 0.1.8

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.
Files changed (2) hide show
  1. package/dist/preset.js +32 -5
  2. package/package.json +8 -11
package/dist/preset.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/preset.ts
@@ -27,10 +37,10 @@ __export(preset_exports, {
27
37
  module.exports = __toCommonJS(preset_exports);
28
38
  var import_node_path = require("path");
29
39
 
30
- // src/framework-preset-vue3-docs.ts
40
+ // src/framework-preset-vue3.ts
31
41
  var import_core = require("@rsbuild/core");
32
42
  var import_docs_tools = require("storybook/internal/docs-tools");
33
- var rsbuildFinal = (config, options) => {
43
+ var rsbuildFinalDoc = (config, options) => {
34
44
  if (!(0, import_docs_tools.hasDocsOrControls)(options))
35
45
  return config;
36
46
  let vueDocgenOptions = {};
@@ -43,7 +53,7 @@ var rsbuildFinal = (config, options) => {
43
53
  };
44
54
  }
45
55
  }
46
- const finalConfig = (0, import_core.mergeRsbuildConfig)(config, {
56
+ return {
47
57
  tools: {
48
58
  rspack: (config2, { mergeConfig }) => {
49
59
  return mergeConfig(config2, {
@@ -67,8 +77,25 @@ var rsbuildFinal = (config, options) => {
67
77
  });
68
78
  }
69
79
  }
70
- });
71
- return finalConfig;
80
+ };
81
+ };
82
+ var rsbuildFinalBase = (config, options) => {
83
+ return {
84
+ resolve: {
85
+ alias: {
86
+ // https://github.com/fengyuanchen/vue-feather/issues/8
87
+ // Port https://github.com/storybookjs/storybook/blob/4224713c21c1f1ada8aca68db1b855dfad7f6975/code/presets/vue3-webpack/src/framework-preset-vue3.ts#L59.
88
+ vue$: require.resolve("vue/dist/vue.esm-bundler.js")
89
+ }
90
+ }
91
+ };
92
+ };
93
+ var rsbuildFinal = (config, options) => {
94
+ return (0, import_core.mergeRsbuildConfig)(
95
+ config,
96
+ rsbuildFinalBase(config, options),
97
+ rsbuildFinalDoc(config, options)
98
+ );
72
99
  };
73
100
 
74
101
  // src/preset.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook-vue3-rsbuild",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Storybook for Vue3 and Rsbuild: Develop React Component in isolation with Hot Reloading.",
5
5
  "keywords": [
6
6
  "storybook",
@@ -48,22 +48,19 @@
48
48
  "dependencies": {
49
49
  "@storybook/vue3": "^8.2.1",
50
50
  "vue-docgen-loader": "^1.5.1",
51
- "storybook-builder-rsbuild": "0.1.6"
51
+ "storybook-builder-rsbuild": "0.1.8"
52
52
  },
53
53
  "devDependencies": {
54
- "@rsbuild/core": "^1.1.7",
54
+ "@rsbuild/core": "^1.1.13",
55
55
  "@types/node": "^18.0.0",
56
- "storybook": "8.5.0-alpha.15",
57
- "typescript": "^5.7.2"
56
+ "storybook": "8.5.0-beta.8",
57
+ "typescript": "^5.7.3",
58
+ "vue": "^3.5.13"
58
59
  },
59
60
  "peerDependencies": {
60
61
  "@rsbuild/core": "^1.0.1",
61
- "storybook": "^8.2.1"
62
- },
63
- "peerDependenciesMeta": {
64
- "typescript": {
65
- "optional": true
66
- }
62
+ "storybook": "^8.2.1",
63
+ "vue": "^3.0.0"
67
64
  },
68
65
  "engines": {
69
66
  "node": ">=18.0.0"