@rsbuild/plugin-svelte 0.3.5 → 0.3.7

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
@@ -19,14 +19,12 @@ interface SvelteLoaderOptions {
19
19
  type PluginSvelteOptions = {
20
20
  /**
21
21
  * The options of svelte-loader
22
- *
23
- * See https://github.com/sveltejs/svelte-loader
22
+ * @see https://github.com/sveltejs/svelte-loader
24
23
  */
25
24
  svelteLoaderOptions?: SvelteLoaderOptions;
26
25
  /**
27
- * The options of svelte-preprocess
28
- *
29
- * See https://github.com/sveltejs/svelte-preprocess
26
+ * The options of svelte-preprocess.
27
+ * @see https://github.com/sveltejs/svelte-preprocess
30
28
  */
31
29
  preprocessOptions?: AutoPreprocessOptions;
32
30
  };
package/dist/index.js CHANGED
@@ -33,7 +33,7 @@ __export(src_exports, {
33
33
  pluginSvelte: () => pluginSvelte
34
34
  });
35
35
  module.exports = __toCommonJS(src_exports);
36
- var import_path = __toESM(require("path"));
36
+ var import_node_path = __toESM(require("path"));
37
37
  var import_core = require("@rsbuild/core");
38
38
  var import_shared = require("@rsbuild/shared");
39
39
  function pluginSvelte(options = {}) {
@@ -42,7 +42,7 @@ function pluginSvelte(options = {}) {
42
42
  setup(api) {
43
43
  let sveltePath = "";
44
44
  try {
45
- sveltePath = import_path.default.dirname(
45
+ sveltePath = import_node_path.default.dirname(
46
46
  require.resolve("svelte/package.json", {
47
47
  paths: [api.context.rootPath]
48
48
  })
@@ -58,7 +58,7 @@ function pluginSvelte(options = {}) {
58
58
  api.modifyBundlerChain(async (chain, { CHAIN_ID, isProd }) => {
59
59
  const { default: sveltePreprocess } = await import("svelte-preprocess");
60
60
  const rsbuildConfig = api.getNormalizedConfig();
61
- chain.resolve.alias.set("svelte", import_path.default.join(sveltePath, "src/runtime"));
61
+ chain.resolve.alias.set("svelte", import_node_path.default.join(sveltePath, "src/runtime"));
62
62
  chain.resolve.extensions.add(".svelte");
63
63
  chain.resolve.mainFields.add("svelte").add("...");
64
64
  chain.resolve.set("conditionNames", ["svelte", "..."]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-svelte",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "Svelte plugin for Rsbuild",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,17 +24,17 @@
24
24
  "dependencies": {
25
25
  "svelte-loader": "3.1.9",
26
26
  "svelte-preprocess": "^5.0.4",
27
- "@rsbuild/shared": "0.3.5"
27
+ "@rsbuild/shared": "0.3.7"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "16.x",
31
31
  "svelte": "^4.2.2",
32
32
  "typescript": "^5.3.0",
33
- "@rsbuild/core": "0.3.5",
34
- "@scripts/test-helper": "0.3.5"
33
+ "@rsbuild/core": "0.3.7",
34
+ "@scripts/test-helper": "0.3.7"
35
35
  },
36
36
  "peerDependencies": {
37
- "@rsbuild/core": "^0.3.5"
37
+ "@rsbuild/core": "^0.3.7"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public",