vite dynamic import and remove css

Viewed 655

I use style-loader in webpack to add id attribute to the style tag to find which css file I just dynamiclly imported.

{
  loader: 'style-loader',
  options: {
    attributes: {
      id: 'theme-style'
    }
  }
}

Is there a way vite can do the same thing?

0 Answers
Related