@rsbuild/plugin-vue2 0.0.0-next-20240112061202 → 0.0.0-next-20240227022717

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/dist/index.d.ts CHANGED
@@ -2,13 +2,28 @@ import { RsbuildPlugin } from '@rsbuild/core';
2
2
  import { VueLoaderOptions } from 'vue-loader';
3
3
 
4
4
  type SplitVueChunkOptions = {
5
+ /**
6
+ * Whether to enable split chunking for Vue-related dependencies (e.g., vue, vue-loader).
7
+ * @default true
8
+ */
5
9
  vue?: boolean;
10
+ /**
11
+ * Whether to enable split chunking for vue-router.
12
+ * @default true
13
+ */
6
14
  router?: boolean;
7
15
  };
8
16
  type PluginVueOptions = {
17
+ /**
18
+ * Options passed to `vue-loader`.
19
+ * @see https://vue-loader.vuejs.org/
20
+ */
9
21
  vueLoaderOptions?: VueLoaderOptions;
22
+ /**
23
+ * This option is used to control the split chunks behavior.
24
+ */
10
25
  splitChunks?: SplitVueChunkOptions;
11
26
  };
12
27
  declare function pluginVue2(options?: PluginVueOptions): RsbuildPlugin;
13
28
 
14
- export { PluginVueOptions, SplitVueChunkOptions, pluginVue2 };
29
+ export { type PluginVueOptions, type SplitVueChunkOptions, pluginVue2 };
package/dist/index.js CHANGED
@@ -63,6 +63,7 @@ var applySplitChunksRule = (api, options = {
63
63
  }
64
64
  chain.optimization.splitChunks({
65
65
  ...currentConfig,
66
+ // @ts-expect-error Rspack and Webpack uses different cacheGroups type
66
67
  cacheGroups: {
67
68
  ...currentConfig.cacheGroups,
68
69
  ...(0, import_shared.createCacheGroups)(extraGroups)
package/dist/index.mjs CHANGED
@@ -1,3 +1,6 @@
1
+ import { createRequire } from 'module';
2
+ var require = createRequire(import.meta['url']);
3
+
1
4
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
5
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
6
  }) : x)(function(x) {
@@ -6,14 +9,10 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
6
9
  throw Error('Dynamic require of "' + x + '" is not supported');
7
10
  });
8
11
 
9
- // ../../node_modules/.pnpm/@modern-js+module-tools@2.45.0_typescript@5.3.2/node_modules/@modern-js/module-tools/shims/esm.js
12
+ // ../../node_modules/.pnpm/@modern-js+module-tools@2.47.0_typescript@5.3.2/node_modules/@modern-js/module-tools/shims/esm.js
10
13
  import { fileURLToPath } from "url";
11
14
  import path from "path";
12
15
 
13
- // ../../scripts/requireShims.js
14
- import { createRequire } from "module";
15
- global.require = createRequire(import.meta.url);
16
-
17
16
  // src/index.ts
18
17
  import { deepmerge } from "@rsbuild/shared";
19
18
  import { VueLoaderPlugin } from "vue-loader";
@@ -48,6 +47,7 @@ var applySplitChunksRule = (api, options = {
48
47
  }
49
48
  chain.optimization.splitChunks({
50
49
  ...currentConfig,
50
+ // @ts-expect-error Rspack and Webpack uses different cacheGroups type
51
51
  cacheGroups: {
52
52
  ...currentConfig.cacheGroups,
53
53
  ...createCacheGroups(extraGroups)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-vue2",
3
- "version": "0.0.0-next-20240112061202",
3
+ "version": "0.0.0-next-20240227022717",
4
4
  "description": "Vue 2 plugin of Rsbuild",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {
@@ -25,16 +25,16 @@
25
25
  "dependencies": {
26
26
  "vue-loader": "^15.11.1",
27
27
  "webpack": "^5.89.0",
28
- "@rsbuild/shared": "0.0.0-next-20240112061202"
28
+ "@rsbuild/shared": "0.0.0-next-20240227022717"
29
29
  },
30
30
  "devDependencies": {
31
31
  "typescript": "^5.3.0",
32
32
  "webpack": "^5.89.0",
33
- "@rsbuild/core": "0.0.0-next-20240112061202",
34
- "@scripts/test-helper": "0.0.0-next-20240112061202"
33
+ "@rsbuild/core": "0.0.0-next-20240227022717",
34
+ "@scripts/test-helper": "0.0.0-next-20240227022717"
35
35
  },
36
36
  "peerDependencies": {
37
- "@rsbuild/core": "0.0.0-next-20240112061202"
37
+ "@rsbuild/core": "0.0.0-next-20240227022717"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public",