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

Turn off live code reloading #1829

Closed
gnapse opened this issue Dec 11, 2018 · 5 comments
Closed

Turn off live code reloading #1829

gnapse opened this issue Dec 11, 2018 · 5 comments

Comments

@gnapse
Copy link

gnapse commented Dec 11, 2018

From the README

If you want to use live code reloading, or you have enough JavaScript that on-demand compilation is too slow, you'll need to run ./bin/webpack-dev-server or ruby ./bin/webpack-dev-server.

What if I want this option for the second reason stated above (I have enough JavaScript that on-demand compilation is too slow) but I do not want live code reloading? Is there a way to turn it off? I tried to find about it in the documentation but did not find it.

@jakeNiemiec
Copy link
Member

I think the option to do this while running the dev server was removed: #724

But, it looks like you could just use this instead of spinning up the dev server:

# watcher
./bin/webpack --watch --colors --progress

# standalone build
./bin/webpack

@gnapse
Copy link
Author

gnapse commented Dec 11, 2018

But isn't it the server the only option that will stop on-demand compilation? I recall that with the command above on-demand compilation still occurred. Will try again to confirm or deny.

@jakeNiemiec
Copy link
Member

Did you try compile: false in your webpacker.yml?

compile: false

@gauravtiwari
Copy link
Member

Thanks @jakeNiemiec

As suggested, please use watcher if you don't want dev server:

# watcher
./bin/webpack --watch --colors --progress

@gnapse
Copy link
Author

gnapse commented Dec 15, 2018

Thanks! The compile: false was all I needed, since I was still using the watcher command, but the rails server was also compiling on its own.

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