Open hbarcelos opened 2 years ago
I am trying to use this plugin with parcel v2 but I keep getting the following error:
ReferenceError: Layout is not defined
The relevant config files are:
.parcelrc
{ "extends": "@parcel/config-default", "transformers": { "*.svg": ["@parcel/transformer-svgo", "@parcel/transformer-svg-react", "@parcel/transformer-js"] } }
.babelrc
{ "plugins": [ [ "import", { "libraryName": "antd", "style": "css" }, "antd" ] ] }
If I install @babel/cli and run babel myFile.js with
@babel/cli
babel myFile.js
{ "presets": ["@babel/preset-react"], "plugins": [ "@babel/plugin-syntax-jsx", [ "import", { "libraryName": "antd", "style": "css" }, "antd" ] ] }
then the component is still imported.
But if I remove the "presets" line, then the import is removed even though there is a JSX element that references it.
"presets"
I am trying to use this plugin with parcel v2 but I keep getting the following error:
The relevant config files are:
.parcelrc
.babelrc
If I install
@babel/cli
and runbabel myFile.js
with.babelrc
then the component is still imported.
But if I remove the
"presets"
line, then the import is removed even though there is a JSX element that references it.