stylus-native-loader icon indicating copy to clipboard operation
stylus-native-loader copied to clipboard

`watchingDirs` and sourceMap enabled cause webpack 5 looping build

Open singggum3b opened this issue 4 years ago • 1 comments

Hi ! As title stated, when watchingDirs and sourceMap are enable webpack 5 keep looping build when there're no changes

"webpack": "^5.23.0",
"stylus": "^0.54.8",
"stylus-native-loader": "^1.4.4",
{
                test: /\.(styl|css)$/i,
                use: [
                    // {
                    //     loader: "style-loader",
                    //     options: {
                    //         sourceMap: true,
                    //     }
                    // },
                    MiniCssExtractPlugin.loader,
					{
						loader: "css-loader", // translates CSS into CommonJS
						options: {
							modules: {
								// auto: true,
								localIdentName: isProduction ? "[hash:base64]" : "[path][name]__[local]--[hash:base64:5]",
								// localIdentContext: path.resolve(__dirname, SRC_FOLDER),
							},
							importLoaders: 3
						}
					},
                    {
                        loader: "typed-css-modules-loader",
                    },
                    {
                        loader: "postcss-loader",
                    },
					{
					    loader: "stylus-native-loader",
					    options: {
							include: [
								`./${SRC_FOLDER}`
							],
					    }
					},
                ]
            },

singggum3b avatar Feb 24 '21 17:02 singggum3b

Sorry for the late reply, I somehow missed the notification for this issue 😅

I've tried to reproduce the issue on my side but I can't seem to get it to loop. Would it be possible for you to post your full webpack.config.js or set up a repro?

I'm also curious if this happens in watch mode or when just running a normal build?

slightlyfaulty avatar Mar 26 '21 21:03 slightlyfaulty