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.

webpack dev server support

See original GitHub issue

First of all thank you for this great plugin, i tried several one and this one is best working, easy to configure and most up to date.

Description Does it support webpack dev server?

When i have a config with direct files in array like this:

new SVGSpritemapPlugin(
        [
          'src/svgSprite/**/*.svg',
          '../common/src/svgSprite/arrow-up-1.svg',
          '../common/src/svgSprite/fb.svg',
          '../common/src/svgSprite/chevron-right.svg',
          '../common/src/svgSprite/cross-solid.svg',
          '../common/src/svgSprite/cross.svg',
          '../common/src/svgSprite/instagram.svg',
        ],
        {
          output: {
            filename: 'images/svg-sprite.svg',
          },
          sprite: {
            prefix: 'svg-icon-',
            generate: {
              title: false,
            },
          },
          styles: false,
        }
      ),

when i start webpack dev server i get errors in cli:

Watchpack Error (initial scan): Error: ENOTDIR: not a directory, scandir '/var/www/html/common/src/svgSprite/arrow-up-1.svg'
Watchpack Error (initial scan): Error: ENOTDIR: not a directory, scandir '/var/www/html/common/src/svgSprite/fb.svg'
Watchpack Error (initial scan): Error: ENOTDIR: not a directory, scandir '/var/www/html/common/src/svgSprite/chevron-right.svg'
Watchpack Error (initial scan): Error: ENOTDIR: not a directory, scandir '/var/www/html/common/src/svgSprite/cross-solid.svg'
Watchpack Error (initial scan): Error: ENOTDIR: not a directory, scandir '/var/www/html/common/src/svgSprite/cross.svg'

Everything works when i build the project, just watch for changes using webpack dev server is problem. So my question is, does it support webpack dev server? if yes, its a bug? if no how about to add feature to support it?

Thank you

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
cascornelissencommented, Jun 20, 2022

Just got confirmation the other issue is also solved so I’ve published version 4.4.1 which includes this fix.

1reaction
cascornelissencommented, Jun 19, 2022

I’ve made some changes in 055d348 that should solve this. Could you try it out on your end by installing directly from master by running the following command?

npm install cascornelissen/svg-spritemap-webpack-plugin#master
Read more comments on GitHub >

github_iconTop Results From Across the Web

DevServer - webpack
The dev server will migrate over to Node's built-in HTTP/2 once Express supports it. HTTP/2 with a self-signed certificate: webpack.config.js
Read more >
webpack-dev-server - npm
webpack -dev-server is configured by default to support live-reload of files as you edit your assets while the server is running. See the ......
Read more >
Webpack Dev Server - GitHub
While webpack-dev-server transpiles the client (browser) scripts to an ES5 state, the project only officially supports the last two versions of major browsers....
Read more >
webpack-dev-server
Inline mode (a small webpack-dev-server client entry is added to the bundle which refresh the page on change). Each mode also supports Hot...
Read more >
How to setup your perfect Webpack dev server environment ...
A tutorial to setup webpack dev server, and hot reloading. ... Now that you know Webpack dev server may help you quickly develop...
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