Replies: 1 comment
-
You should exclude your files from watching, so webpack will not run compilation again |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, Iam totally new in webpack. Trying to create a plugin to create sprite sheet (image + coordinate file). My idea is
Get all image asset => create a sprite image
Generate coordinate map and emit or write to disk (.json)
My little plugin works fine but it has a trouble in dev mode
If I try to write coordinate file to disk (using fs.writeFile, write-file-atom, ...). Webpack devServer will trigger hot reload -> plugin create file again -> devServer is triggered -> ... (infinity looping)
I try to use
compilation.emitAsset('coordinateMapping.json', <some_data>)
. It can prevent infinity loop but how can I import this file into my code base if it doesn't existsMy plugin can be found here
Beta Was this translation helpful? Give feedback.
All reactions