@rsbuild/plugin-svgr 0.3.10 → 0.4.0

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.js CHANGED
@@ -36,7 +36,6 @@ module.exports = __toCommonJS(src_exports);
36
36
  var import_node_path = __toESM(require("path"));
37
37
  var import_shared = require("@rsbuild/shared");
38
38
  var import_plugin_react = require("@rsbuild/plugin-react");
39
- var import_core = require("@rsbuild/core");
40
39
  function getSvgoDefaultConfig() {
41
40
  return {
42
41
  plugins: [
@@ -56,12 +55,7 @@ function getSvgoDefaultConfig() {
56
55
  }
57
56
  var pluginSvgr = (options = {}) => ({
58
57
  name: "rsbuild:svgr",
59
- pre: [
60
- // SVGR needs to reuse the SWC loader options with react config
61
- import_plugin_react.PLUGIN_REACT_NAME,
62
- import_core.PLUGIN_BABEL_NAME,
63
- "uni-builder:babel"
64
- ],
58
+ pre: [import_plugin_react.PLUGIN_REACT_NAME],
65
59
  setup(api) {
66
60
  api.modifyBundlerChain(async (chain, { isProd, CHAIN_ID }) => {
67
61
  const config = api.getNormalizedConfig();
package/dist/index.mjs CHANGED
@@ -21,7 +21,6 @@ import {
21
21
  chainStaticAssetRule
22
22
  } from "@rsbuild/shared";
23
23
  import { PLUGIN_REACT_NAME } from "@rsbuild/plugin-react";
24
- import { PLUGIN_BABEL_NAME } from "@rsbuild/core";
25
24
  function getSvgoDefaultConfig() {
26
25
  return {
27
26
  plugins: [
@@ -41,12 +40,7 @@ function getSvgoDefaultConfig() {
41
40
  }
42
41
  var pluginSvgr = (options = {}) => ({
43
42
  name: "rsbuild:svgr",
44
- pre: [
45
- // SVGR needs to reuse the SWC loader options with react config
46
- PLUGIN_REACT_NAME,
47
- PLUGIN_BABEL_NAME,
48
- "uni-builder:babel"
49
- ],
43
+ pre: [PLUGIN_REACT_NAME],
50
44
  setup(api) {
51
45
  api.modifyBundlerChain(async (chain, { isProd, CHAIN_ID }) => {
52
46
  const config = api.getNormalizedConfig();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-svgr",
3
- "version": "0.3.10",
3
+ "version": "0.4.0",
4
4
  "description": "svgr plugin for Rsbuild",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,17 +26,17 @@
26
26
  "@svgr/core": "8.1.0",
27
27
  "@svgr/plugin-jsx": "8.1.0",
28
28
  "@svgr/plugin-svgo": "8.1.0",
29
- "@rsbuild/shared": "0.3.10",
30
- "@rsbuild/plugin-react": "0.3.10"
29
+ "@rsbuild/shared": "0.4.0",
30
+ "@rsbuild/plugin-react": "0.4.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "16.x",
34
34
  "typescript": "^5.3.0",
35
- "@rsbuild/core": "0.3.10",
36
- "@scripts/test-helper": "0.3.10"
35
+ "@rsbuild/core": "0.4.0",
36
+ "@scripts/test-helper": "0.4.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "@rsbuild/core": "^0.3.10"
39
+ "@rsbuild/core": "^0.4.0"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public",