Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it compatible with webpack 4 #11

Open
no-more opened this issue Sep 1, 2018 · 2 comments
Open

is it compatible with webpack 4 #11

no-more opened this issue Sep 1, 2018 · 2 comments

Comments

@no-more
Copy link

no-more commented Sep 1, 2018

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

@bbert
Copy link

bbert commented Oct 9, 2018

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

@Hoomanmsh
Copy link

Hoomanmsh commented Apr 9, 2020

@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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants