Skip to content

Throw earlier for non-browser environment #136

New issue

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

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

Already on GitHub? # to your account

Closed
mohsen1 opened this issue Jul 16, 2016 · 4 comments
Closed

Throw earlier for non-browser environment #136

mohsen1 opened this issue Jul 16, 2016 · 4 comments

Comments

@mohsen1
Copy link

mohsen1 commented Jul 16, 2016

this line runs before this line that throws "The style-loader cannot be used in a non-browser environment".

@ahstro
Copy link
Contributor

ahstro commented Jul 27, 2016

How? I might be reading it wrong, but it looks to me like the throw-line runs first thing in the loader, while the line you're pointing to is just a declaration of a function that is called a few lines below?

@mohsen1
Copy link
Author

mohsen1 commented Jul 27, 2016

I didn't study the code very closely. Maybe I'm wrong but the error I was getting wasn't the thrown error I mentioned

@ahstro
Copy link
Contributor

ahstro commented Jul 27, 2016

I'm no expert at all, so I'm only guessing, but I think that the non-browser-error is only thrown if you're in some sort of debug mode. Maybe you were in in release or just undefined mode (no idea how one would define a mode to begin with)

@michael-ciniawsky
Copy link
Member

According to #159 (last comment) any kind SSR(-ish) support in style-loader will be rejected in the future, style-loader will only work within the browser. For SSR(-ish) solutions also see #159 Thx 😛

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

No branches or pull requests

3 participants