@rsbuild/plugin-svgr 0.3.11 → 0.4.1

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,13 +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_core.PLUGIN_SWC_NAME,
62
- import_plugin_react.PLUGIN_REACT_NAME,
63
- import_core.PLUGIN_BABEL_NAME,
64
- "uni-builder:babel"
65
- ],
58
+ pre: [import_plugin_react.PLUGIN_REACT_NAME],
66
59
  setup(api) {
67
60
  api.modifyBundlerChain(async (chain, { isProd, CHAIN_ID }) => {
68
61
  const config = api.getNormalizedConfig();
package/dist/index.mjs CHANGED
@@ -21,10 +21,6 @@ import {
21
21
  chainStaticAssetRule
22
22
  } from "@rsbuild/shared";
23
23
  import { PLUGIN_REACT_NAME } from "@rsbuild/plugin-react";
24
- import {
25
- PLUGIN_BABEL_NAME,
26
- PLUGIN_SWC_NAME
27
- } from "@rsbuild/core";
28
24
  function getSvgoDefaultConfig() {
29
25
  return {
30
26
  plugins: [
@@ -44,13 +40,7 @@ function getSvgoDefaultConfig() {
44
40
  }
45
41
  var pluginSvgr = (options = {}) => ({
46
42
  name: "rsbuild:svgr",
47
- pre: [
48
- // SVGR needs to reuse the SWC loader options with react config
49
- PLUGIN_SWC_NAME,
50
- PLUGIN_REACT_NAME,
51
- PLUGIN_BABEL_NAME,
52
- "uni-builder:babel"
53
- ],
43
+ pre: [PLUGIN_REACT_NAME],
54
44
  setup(api) {
55
45
  api.modifyBundlerChain(async (chain, { isProd, CHAIN_ID }) => {
56
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.11",
3
+ "version": "0.4.1",
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.11",
30
- "@rsbuild/plugin-react": "0.3.11"
29
+ "@rsbuild/shared": "0.4.1",
30
+ "@rsbuild/plugin-react": "0.4.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "16.x",
34
34
  "typescript": "^5.3.0",
35
- "@rsbuild/core": "0.3.11",
36
- "@scripts/test-helper": "0.3.11"
35
+ "@rsbuild/core": "0.4.1",
36
+ "@scripts/test-helper": "0.4.1"
37
37
  },
38
38
  "peerDependencies": {
39
- "@rsbuild/core": "^0.3.11"
39
+ "@rsbuild/core": "^0.4.1"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public",