AdamD3v84
AdamD3v84

Reputation: 23

Exlcude Folder From Watch

Hello all I'm still trying to figure out how to exclude my Dynamic Images folder in Webpack. I have tried both Watch option Exclude and Watch Ignore Plugin. If anyone could point me in the right direction it would be appreciated I have spent several days attempting to figure this out with no success.

Please find issue details here: React Application Reloading (Webpack) when Saving Image to Server

also

I have no clue if this section is some how overriding my Exclude/IgnoreWatch entries.

   // "oneOf" will traverse all following loaders until one will
          // match the requirements. When no loader matches it will fall
          // back to the "file" loader at the end of the loader list.
          oneOf: [
            // "url" loader works like "file" loader except that it embeds assets
            // smaller than specified limit in bytes as data URLs to avoid requests.
            // A missing `test` is equivalent to a match.
            {
              test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
                  loader: require.resolve('url-loader'),
         
              options: {
                limit: imageInlineSizeLimit,
                name: 'static/media/[name].[hash:8].[ext]',
              },
            },

Upvotes: 0

Views: 42

Answers (1)

AdamD3v84
AdamD3v84

Reputation: 23

I think the main issue here was that I was using REQUIRE around my images. Even if this image location is in the public folder or excluded from webpack it would seem that its still tracked by the REQUIRE tag. To fix this I moved my images to the public folder and used URL paths to reference images.

This fixed the App Reloading issue.

Upvotes: 1

Related Questions