Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReactToastify.css.map missing when using react-scripts 5.0.1 #261

Open
kevpie opened this issue Aug 27, 2022 · 2 comments
Open

ReactToastify.css.map missing when using react-scripts 5.0.1 #261

kevpie opened this issue Aug 27, 2022 · 2 comments

Comments

@kevpie
Copy link

kevpie commented Aug 27, 2022

It seems like the babel inlined ReactToastify.css from react-toastify could use the ReactToastify.css.map being added to the courier-toast dist.

react-scripts start

Compiled with warnings.

Failed to parse source map from '/Users/kevin/perkup-app/node_modules/@trycourier/react-toast/dist/components/Toast/ReactToastify.css.map' file: Error: ENOENT: no such file or directory, open '/Users/kevin/perkup-app/node_modules/@trycourier/react-toast/dist/components/Toast/ReactToastify.css.map'

Failed to parse source map from '/Users/kevin/perkup-app/node_modules/@trycourier/react-toast/dist/components/ReactToastify.css.map' file: Error: ENOENT: no such file or directory, open '/Users/kevin/perkup-app/node_modules/@trycourier/react-toast/dist/components/ReactToastify.css.map'

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

WARNING in ./node_modules/@trycourier/react-toast/dist/components/Toast/index.js
Module Warning (from ./node_modules/react-scripts/node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/kevin/perkup-app/node_modules/@trycourier/react-toast/dist/components/Toast/ReactToastify.css.map' file: Error: ENOENT: no such file or directory, open '/Users/kevin/perkup-app/node_modules/@trycourier/react-toast/dist/components/Toast/ReactToastify.css.map'

WARNING in ./node_modules/@trycourier/react-toast/dist/components/index.js
Module Warning (from ./node_modules/react-scripts/node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/kevin/perkup-app/node_modules/@trycourier/react-toast/dist/components/ReactToastify.css.map' file: Error: ENOENT: no such file or directory, open '/Users/kevin/perkup-app/node_modules/@trycourier/react-toast/dist/components/ReactToastify.css.map'

temporary workaround

GENERATE_SOURCEMAP=false react-scripts start
@rileylnapier
Copy link
Collaborator

seems like we may need to use something different besides "babel-plugin-inline-import" for css to get a sourcemap generated. hmm

@rileylnapier
Copy link
Collaborator

i've been looking to upgrade react-toastify too so that may help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants