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

bug: fails on dev due to svg-loader #4

Closed
debs-obrien opened this issue Feb 11, 2021 · 6 comments · Fixed by #10
Closed

bug: fails on dev due to svg-loader #4

debs-obrien opened this issue Feb 11, 2021 · 6 comments · Fixed by #10

Comments

@debs-obrien
Copy link

Describe the bug
Dev server doesn't work

To Reproduce
Steps to reproduce the behavior:

  1. Clone repository https://github.com/debs-obrien/debbie.codes
  2. install module and run dev
  3. Module build failed (from ./node_modules/vue-svg-loader/index.js):

Expected behavior
Generate works but dev doesn't

Screenshots
Screenshot 2021-02-11 at 13 10 15

Additional context
Don't see any improvements in speed, removed node modules and yarn lock. Generation takes same time and dev takes same time but then breaks

@debs-obrien
Copy link
Author

tested with this: imageFileLoader: false
but still same error

@harlan-zw
Copy link
Owner

Thank you, will take a look tomorrow.

@debs-obrien
Copy link
Author

actually adding imageFileLoader: false inside features as per docs 🙈 does work

harlan-zw added a commit that referenced this issue Feb 12, 2021
Keep the webpack image file rule and avoid resource query substitutions (fixes #4)
@AndrewBogdanovTSS
Copy link

@loonpwn is there any way to exclude only specific files and not all images?

@harlan-zw
Copy link
Owner

@loonpwn is there any way to exclude only specific files and not all images?

Hey @AndrewBogdanovTSS

Would you mind sharing your use case for that behaviour? The replacement of the url-loader for file-loader should have no side effects on your app (assuming you are using the latest version).

If it is causing some issues then maybe there is something deeper I can look into fixing for you.

Otherwise as Debbie has said above, you can manually disable this feature using the config.

buildOptimisations: {
 //... 
 features: {
   imageFileLoader: false
 }
}

@AndrewBogdanovTSS
Copy link

@loonpwn I would only like to disable it for one file which is generated from @nuxtjs/svg-sprite - icons.svg, other files seems to have no issues with imageFileLoader

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

Successfully merging a pull request may close this issue.

3 participants