Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Webpack 监视中的Exlcude文件夹_Webpack - Fatal编程技术网

Webpack 监视中的Exlcude文件夹

Webpack 监视中的Exlcude文件夹,webpack,Webpack,大家好,我仍在试图找出如何排除我的动态图像文件夹中的网页。我已经尝试了Watch option Exclude和Watch Ignore插件。如果有人能给我指出正确的方向,我会很感激我花了几天的时间试图解决这个问题,但没有成功 请在此处查找问题详细信息: 也 我不知道这一部分是否是如何覆盖我的Exclude/IgnoreWatch条目的 // "oneOf" will traverse all following loaders until one will

大家好,我仍在试图找出如何排除我的动态图像文件夹中的网页。我已经尝试了Watch option Exclude和Watch Ignore插件。如果有人能给我指出正确的方向,我会很感激我花了几天的时间试图解决这个问题,但没有成功

请在此处查找问题详细信息:

我不知道这一部分是否是如何覆盖我的Exclude/IgnoreWatch条目的

   // "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]',
              },
            },

我认为这里的主要问题是我在我的图像周围使用了REQUIRE。即使此图像位置位于公用文件夹中或从网页中排除,它似乎仍由REQUIRE标记跟踪。为了解决这个问题,我将我的图像移动到公用文件夹,并使用URL路径引用图像

这修复了应用程序重新加载问题