question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom vite plugin not working

See original GitHub issue

I’m trying to install the vite-plugin-react-svg plugin in a react storybook app and it doesn’t seem to work.

I’ve tried adding the plugin both to vite.config.js and to .storybook/main.js’s viteFinal and nothing seems to have changed.

Any ideas how could I debug / solve this issue?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
schalk-bcommented, Jun 24, 2021

Just an observation, instead of: plugins: [svgPlugin(), reactRefresh()], you should use plugins: [...config.plugins, svgPlugin(), reactRefresh()],

Otherwise you override the default plugins configuration

0reactions
IanVScommented, Nov 24, 2022

@benglewis can you please open a new issue with all the details so we can help?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plugin API - Vite
Plugin API #. Vite plugins extends Rollup's well-designed plugin interface with a few extra Vite-specific options. As a result, you can write a...
Read more >
i use `define` in custom vite plugin, but it not work in runtime ...
i use `define` in custom vite plugin, and `JSON.stringify`. but it can't find `process` in runtime project. vite version is: 2.4.0 docs: ...
Read more >
Building a plugin with Vite | Vue Mastery
... add custom functionality on top of Vite to solve a particular problem. For example, Astro uses a Vite plugin to resolve .astro...
Read more >
Adding a plugin to vite - vue.js - Stack Overflow
This is probably not a problem with npm. There is likely additional logging output above. I also notice VS Code is giving me...
Read more >
Building custom plugins for Vite - DEV Community ‍ ‍
When I first tried it after working with Webpack (and 50-60 seconds project reload time) I immediately felt in love with it. In...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found