Commit 853db4e committed Mar 22, 2020 Verified
1 parent 928ee77 commit 853db4e Copy full SHA for 853db4e
File tree 2 files changed +12
-4
lines changed
packages/parcel-plugin-svgr
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 29
29
"build" : " babel --config-file ../../babel.config.js -d lib --ignore \" **/*.test.js\" src" ,
30
30
"prepublishOnly" : " yarn run build"
31
31
},
32
- "peerDependencies" : {
33
- "parcel" : " ^1.10.0"
34
- },
35
32
"dependencies" : {
36
33
"@babel/core" : " ^7.7.5" ,
37
34
"@babel/plugin-transform-react-constant-elements" : " ^7.7.4" ,
Original file line number Diff line number Diff line change 1
- import { Asset } from 'parcel'
2
1
import { transformAsync , createConfigItem } from '@babel/core'
3
2
import svgo from '@svgr/plugin-svgo'
4
3
import jsx from '@svgr/plugin-jsx'
@@ -7,6 +6,18 @@ import presetReact from '@babel/preset-react'
7
6
import presetEnv from '@babel/preset-env'
8
7
import pluginTransformReactConstantElements from '@babel/plugin-transform-react-constant-elements'
9
8
9
+ /* eslint-disable global-require, import/no-unresolved */
10
+ function requireParcel ( ) {
11
+ try {
12
+ return require ( 'parcel' )
13
+ } catch ( error ) {
14
+ return require ( 'parcel-bundler' )
15
+ }
16
+ }
17
+ /* eslint-enable global-require, import/no-unresolved */
18
+
19
+ const { Asset } = requireParcel ( )
20
+
10
21
const babelOptions = {
11
22
babelrc : false ,
12
23
configFile : false ,
You can’t perform that action at this time.
1 commit comments
vercel[bot] commentedon Mar 22, 2020
Successfully deployed to following URLs: