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

v1.8.3 has broken some image imports #81

Closed
marcjlyoung opened this issue Nov 25, 2021 · 4 comments
Closed

v1.8.3 has broken some image imports #81

marcjlyoung opened this issue Nov 25, 2021 · 4 comments

Comments

@marcjlyoung
Copy link

Not to sure what happened but reverting to 1.8.2 without ^ solves the issue :)

`./src/images/buttons/searchButton.svg
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

|
| <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
`

@marcjlyoung
Copy link
Author

marcjlyoung commented Nov 25, 2021

How to fix the last commit

Why its broken:

Seems the regex is not escaped correctly using new RegExp

image

Solution:
new RegExp('\\.\\w+(?<!(s?c|sa)ss)$', 'i')

Temp solution

Adjust package.json to 1.8.2 without caret (^)

@marcjlyoung
Copy link
Author

@marcjlyoung Could you help me with creating a PR?

Unfortunately I won't be able to assist right now, I quickly posted the solution so you could test it. I'm away from my rig

@arefaslani
Copy link
Member

@marcjlyoung Just added the fix and published a new version. Thanks for the help 👍
Do you think this change is in conflict with this PR?
CC @lvancraen

@marcjlyoung
Copy link
Author

No don't think there is a conflict, I just fixed the new regex param so that it created the same output as was previously there in v1.8.2, since it's still using the new regex function safari should be okay 👍

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

No branches or pull requests

2 participants