Skip to content

Commit 279ffe2

Browse files
authored
Merge pull request #841 from gregberge/no-cycle-build
feat: remove @svgr/plugin-jsx from core
2 parents c74b1ec + b7477c6 commit 279ffe2

File tree

7 files changed

+10
-33
lines changed

7 files changed

+10
-33
lines changed

build/build.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

netlify.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[build]
2+
base = "website/"
3+
publish = "public/"
4+
command = "npm run build"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"examples/*"
66
],
77
"scripts": {
8-
"build": "build/build.sh",
8+
"build": "lerna run build",
99
"dev": "lerna run build --parallel -- --watch",
1010
"format": "prettier --write .",
1111
"lint": "eslint . && prettier --check .",

packages/core/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Use `svgr.sync(code, config, state)` if you would like to use sync version.
3434

3535
### Plugins
3636

37-
By default `@svgr/core` doesn't include `svgo` and `prettier` plugins, if you want them, you have to install them and include them in config.
37+
By default `@svgr/core` doesn't include any plugin, if you want them, you have to install them and include them in config.
3838

3939
```js
4040
svgr(svgCode, {
@@ -54,7 +54,3 @@ MIT
5454
[package]: https://www.npmjs.com/package/@svgr/core
5555
[license-badge]: https://img.shields.io/npm/l/@svgr/core.svg?style=flat-square
5656
[license]: https://github.com/smooth-code/svgr/blob/master/LICENSE
57-
58-
```
59-
60-
```

packages/core/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"dependencies": {
4141
"@babel/core": "^7.21.3",
4242
"@svgr/babel-preset": "^6.5.1",
43-
"@svgr/plugin-jsx": "^6.5.1",
4443
"camelcase": "^6.2.0",
4544
"cosmiconfig": "^8.1.3"
4645
}

packages/core/src/plugins.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ describe('#getPlugins', () => {
1616
expect(getPlugins({}, state)).toEqual(['from-state-plugin'])
1717
})
1818

19-
it('should default to ["@svgr/plugin-jsx"]', () => {
20-
expect(getPlugins({}, {})).toEqual([jsx])
19+
it('should default to []', () => {
20+
expect(getPlugins({}, {})).toEqual([])
2121
})
2222

2323
it('should support caller with "defaultPlugins" in second choice', () => {
24-
expect(getPlugins({}, { caller: {} })).toEqual([jsx])
24+
expect(getPlugins({}, { caller: {} })).toEqual([])
2525
})
2626
})
2727

packages/core/src/plugins.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// @ts-ignore
2-
import jsx from '@svgr/plugin-jsx'
31
import { Config } from './config'
42
import type { State } from './state'
53

@@ -9,7 +7,7 @@ export interface Plugin {
97

108
export type ConfigPlugin = string | Plugin
119

12-
const DEFAULT_PLUGINS: Plugin[] = [jsx as any]
10+
const DEFAULT_PLUGINS: Plugin[] = []
1311

1412
export const getPlugins = (
1513
config: Config,

0 commit comments

Comments
 (0)