webpack-conditional-loader icon indicating copy to clipboard operation
webpack-conditional-loader copied to clipboard

is it compatible with webpack 4

Open no-more opened this issue 6 years ago • 2 comments

Hello,

This is my first attempt to use this loader but I can't make it work. I do have NODE_ENV set but still not working

	console.log("process.env.NODE_ENV", process.env.NODE_ENV); // -> development
	// #endif
	// #if process.env.NODE_ENV === 'production'
	console.log("production Application started"); // is printed to console
	// #endif
	// #if ENV === 'development'
	console.log("development Application started"); // is printed to console
	// #endif

Both log are printed to console

no-more avatar Sep 01 '18 08:09 no-more

I have the same issue, but this is not due to webpack. If you are on Windows, see PR #6

bbert avatar Oct 09 '18 08:10 bbert

@no-more @bbert @caiogondim have same problem

after update the project to last version ( "@babel/core": "7.9.0" , "babel-loader": "8.1.0" , "webpack": "4.42.0" )

i tried to using webpack-conditional-loader again but it didn't work

i made some change in the source code and the problem solved. but when i used this for dynamic import . this error occurred before get the source code in loader . get the syntax error of duplicate import like this :

image

but i test the codes with console.log() and every thing work well

do you have any idea , why this happen ?

Hoomanmsh avatar Apr 09 '20 18:04 Hoomanmsh