-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
webpack-dev-server on custom environment #1291
Comments
@Jaroost Could you set compile to false in home environment please? If I understood correctly you want to use dev server in home environment instead of on demand compiler right? |
I want to use the I tried to change complie to false but it doesn't work. Am i clearer? |
@Jaroost Custom environments are somewhat broken in webpacker. See #1274 You'll need a config/webpack/home.js file for your environment (it used to default to dev or prod before) and I think you need to run the server like |
Just released 3.4.0 and there is some documentation added in README. |
@gauravtiwari I explain my current situation:
So i need to use the webpack-dev-server in this 2 enviroments. Actually this doesn't work in webpacker for 2 reasons: the fetch method in
defaults is nil in that case because in configuration.rb the defaults methods try to retreive defaults values from
but in that case, we can set in custom environment (home.rb) the following enviornment variables:
The second problem is in When we retreive pack files with
In case of a custom environment, the proxy will never be used. So to patch this i just replace the like this, home and webpack-dev-server works but i think that this issue is not resolved. |
@Jaroost Do you have a home environment declared in webpacker.yml? |
@gauravtiwari Yes I have Maybe it's a Windows issue |
@Jaroost Thanks for confirming. Will take a look at this later today. |
@gauravtiwari Just a fyi, but this now works for my staging env. |
I try to use the
webpack-dev-server
script on my custom environmenthome
.I added a new configuration in
webpacker.yml
Then I start the
ruby .\bin\webpack-dev-server
(I am on Windows10)The script compiles on demand works and the server is up and running at https://localhost:3035
But when I make changes, the navigator doesn't refresh automatically and rails server compile instead of the on demande script.
Do i miss something?
PS: In development environment, all works just fine
The text was updated successfully, but these errors were encountered: