Webpacker not compiling liveNPM vs. Bower vs. Browserify vs. Gulp vs. Grunt vs. WebpackDeployed Webpack - Bootstrap Not Working - DigitalOceanreact-hot-loader and webpack not workingRails webpacker is not reading app/javascript/images folderEmitting build file from create-react-appWebpack error on Heroku Deploymentscss file is not in the source map - webpackUpgrading from using Gulp to Webpack with Laravel MixUse a bootstrap custom variables file with webpackerPost CSS in Webpacker
Would this string work as string?
How to leave product feedback on macOS?
Overlapping circles covering polygon
PTIJ: Which Dr. Seuss books should one obtain?
Would a primitive species be able to learn English from reading books alone?
If Captain Marvel (MCU) were to have a child with a human male, would the child be human or Kree?
How do you justify more code being written by following clean code practices?
Can you identify this lizard-like creature I observed in the UK?
Showing mass murder in a kid's book
Language involving irrational number is not a CFL
How to get directions in deep space?
El Dorado Word Puzzle II: Videogame Edition
Sound waves in different octaves
When and why was runway 07/25 at Kai Tak removed?
What is the meaning of the following sentence?
Animation: customize bounce interpolation
Why didn’t Eve recognize the little cockroach as a living organism?
Integral Notations in Quantum Mechanics
Deciphering cause of death?
Air travel with refrigerated insulin
How were servants to the Kaiser of Imperial Germany treated and where may I find more information on them
What is this high flying aircraft over Pennsylvania?
What the heck is gets(stdin) on site coderbyte?
Giving feedback to someone without sounding prejudiced
Webpacker not compiling live
NPM vs. Bower vs. Browserify vs. Gulp vs. Grunt vs. WebpackDeployed Webpack - Bootstrap Not Working - DigitalOceanreact-hot-loader and webpack not workingRails webpacker is not reading app/javascript/images folderEmitting build file from create-react-appWebpack error on Heroku Deploymentscss file is not in the source map - webpackUpgrading from using Gulp to Webpack with Laravel MixUse a bootstrap custom variables file with webpackerPost CSS in Webpacker
I have my Rails apps running and have Webpacker installed. I have the webpack-dev-server running as a Docker container but it doesn;t seem to be responding to changes in my files and recompiling.
Can anyone check my config to see if they can spot anything wrong?
docker-compose.yml:
version: '3.7'
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- 3000:3000
- 35729:35729
- 5000:5000
env_file:
- '.env'
volumes:
- .:/app
- type: tmpfs
target: /app/tmp/pids/
depends_on:
- database
- elasticsearch
- webpacker
database:
image: postgres:9.6-alpine
env_file:
- '.env'
volumes:
- pg-data:/var/lib/postgresql/data
webpacker:
build: .
command: ./bin/webpack-dev-server
env_file:
- '.env'
volumes:
- .:/app
ports:
- 3035:3035
adminer:
image: adminer
restart: always
ports:
- 8080:8080
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.1
env_file:
- '.env'
volumes:
- es-data:/usr/share/elasticsearch/data
ports:
- 9200:9200
volumes:
pg-data:
es-data:
config/webpacker.yml:
# Note: You must restart bin/webpack-dev-server for changes to take effect
default: &default
source_path: app/webpacker
source_entry_path: packs
public_output_path: public/packs
cache_path: tmp/cache/webpacker
# Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets']
resolved_paths: []
# Reload manifest.json on all requests so we reload latest compiled packs
cache_manifest: false
extensions:
- .js
- .sass
- .scss
- .css
- .module.sass
- .module.scss
- .module.css
- .png
- .svg
- .gif
- .jpeg
- .jpg
development:
<<: *default
compile: true
# Reference: https://webpack.js.org/configuration/dev-server/
dev_server:
https: false
host: webpacker
port: 3035
public: webpacker:3035
hmr: false
# Inline should be set to true if using HMR
inline: true
overlay: true
compress: true
disable_host_check: true
use_local_ip: false
quiet: false
headers:
'Access-Control-Allow-Origin': '*'
watch_options:
ignored: /node_modules/
test:
<<: *default
compile: true
# Compile test packs to a separate directory
public_output_path: packs-test
production:
<<: *default
# Production depends on precompilation of packs prior to booting for performance.
compile: false
# Cache manifest.json for performance
cache_manifest: true
config/webpack/loaders/sass.js:
loader: 'postcss-loader',
options:
sourceMap: true,
plugins: (loader) => [
require('postcss-cssnext')(
features:
customProperties:
warnings: false
)
]
My files are in this structure:
I hope you are able to help me as this is stopping my development of this app.
Thanks
ruby-on-rails webpack assets webpack-dev-server webpacker
add a comment |
I have my Rails apps running and have Webpacker installed. I have the webpack-dev-server running as a Docker container but it doesn;t seem to be responding to changes in my files and recompiling.
Can anyone check my config to see if they can spot anything wrong?
docker-compose.yml:
version: '3.7'
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- 3000:3000
- 35729:35729
- 5000:5000
env_file:
- '.env'
volumes:
- .:/app
- type: tmpfs
target: /app/tmp/pids/
depends_on:
- database
- elasticsearch
- webpacker
database:
image: postgres:9.6-alpine
env_file:
- '.env'
volumes:
- pg-data:/var/lib/postgresql/data
webpacker:
build: .
command: ./bin/webpack-dev-server
env_file:
- '.env'
volumes:
- .:/app
ports:
- 3035:3035
adminer:
image: adminer
restart: always
ports:
- 8080:8080
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.1
env_file:
- '.env'
volumes:
- es-data:/usr/share/elasticsearch/data
ports:
- 9200:9200
volumes:
pg-data:
es-data:
config/webpacker.yml:
# Note: You must restart bin/webpack-dev-server for changes to take effect
default: &default
source_path: app/webpacker
source_entry_path: packs
public_output_path: public/packs
cache_path: tmp/cache/webpacker
# Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets']
resolved_paths: []
# Reload manifest.json on all requests so we reload latest compiled packs
cache_manifest: false
extensions:
- .js
- .sass
- .scss
- .css
- .module.sass
- .module.scss
- .module.css
- .png
- .svg
- .gif
- .jpeg
- .jpg
development:
<<: *default
compile: true
# Reference: https://webpack.js.org/configuration/dev-server/
dev_server:
https: false
host: webpacker
port: 3035
public: webpacker:3035
hmr: false
# Inline should be set to true if using HMR
inline: true
overlay: true
compress: true
disable_host_check: true
use_local_ip: false
quiet: false
headers:
'Access-Control-Allow-Origin': '*'
watch_options:
ignored: /node_modules/
test:
<<: *default
compile: true
# Compile test packs to a separate directory
public_output_path: packs-test
production:
<<: *default
# Production depends on precompilation of packs prior to booting for performance.
compile: false
# Cache manifest.json for performance
cache_manifest: true
config/webpack/loaders/sass.js:
loader: 'postcss-loader',
options:
sourceMap: true,
plugins: (loader) => [
require('postcss-cssnext')(
features:
customProperties:
warnings: false
)
]
My files are in this structure:
I hope you are able to help me as this is stopping my development of this app.
Thanks
ruby-on-rails webpack assets webpack-dev-server webpacker
add a comment |
I have my Rails apps running and have Webpacker installed. I have the webpack-dev-server running as a Docker container but it doesn;t seem to be responding to changes in my files and recompiling.
Can anyone check my config to see if they can spot anything wrong?
docker-compose.yml:
version: '3.7'
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- 3000:3000
- 35729:35729
- 5000:5000
env_file:
- '.env'
volumes:
- .:/app
- type: tmpfs
target: /app/tmp/pids/
depends_on:
- database
- elasticsearch
- webpacker
database:
image: postgres:9.6-alpine
env_file:
- '.env'
volumes:
- pg-data:/var/lib/postgresql/data
webpacker:
build: .
command: ./bin/webpack-dev-server
env_file:
- '.env'
volumes:
- .:/app
ports:
- 3035:3035
adminer:
image: adminer
restart: always
ports:
- 8080:8080
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.1
env_file:
- '.env'
volumes:
- es-data:/usr/share/elasticsearch/data
ports:
- 9200:9200
volumes:
pg-data:
es-data:
config/webpacker.yml:
# Note: You must restart bin/webpack-dev-server for changes to take effect
default: &default
source_path: app/webpacker
source_entry_path: packs
public_output_path: public/packs
cache_path: tmp/cache/webpacker
# Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets']
resolved_paths: []
# Reload manifest.json on all requests so we reload latest compiled packs
cache_manifest: false
extensions:
- .js
- .sass
- .scss
- .css
- .module.sass
- .module.scss
- .module.css
- .png
- .svg
- .gif
- .jpeg
- .jpg
development:
<<: *default
compile: true
# Reference: https://webpack.js.org/configuration/dev-server/
dev_server:
https: false
host: webpacker
port: 3035
public: webpacker:3035
hmr: false
# Inline should be set to true if using HMR
inline: true
overlay: true
compress: true
disable_host_check: true
use_local_ip: false
quiet: false
headers:
'Access-Control-Allow-Origin': '*'
watch_options:
ignored: /node_modules/
test:
<<: *default
compile: true
# Compile test packs to a separate directory
public_output_path: packs-test
production:
<<: *default
# Production depends on precompilation of packs prior to booting for performance.
compile: false
# Cache manifest.json for performance
cache_manifest: true
config/webpack/loaders/sass.js:
loader: 'postcss-loader',
options:
sourceMap: true,
plugins: (loader) => [
require('postcss-cssnext')(
features:
customProperties:
warnings: false
)
]
My files are in this structure:
I hope you are able to help me as this is stopping my development of this app.
Thanks
ruby-on-rails webpack assets webpack-dev-server webpacker
I have my Rails apps running and have Webpacker installed. I have the webpack-dev-server running as a Docker container but it doesn;t seem to be responding to changes in my files and recompiling.
Can anyone check my config to see if they can spot anything wrong?
docker-compose.yml:
version: '3.7'
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- 3000:3000
- 35729:35729
- 5000:5000
env_file:
- '.env'
volumes:
- .:/app
- type: tmpfs
target: /app/tmp/pids/
depends_on:
- database
- elasticsearch
- webpacker
database:
image: postgres:9.6-alpine
env_file:
- '.env'
volumes:
- pg-data:/var/lib/postgresql/data
webpacker:
build: .
command: ./bin/webpack-dev-server
env_file:
- '.env'
volumes:
- .:/app
ports:
- 3035:3035
adminer:
image: adminer
restart: always
ports:
- 8080:8080
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.1
env_file:
- '.env'
volumes:
- es-data:/usr/share/elasticsearch/data
ports:
- 9200:9200
volumes:
pg-data:
es-data:
config/webpacker.yml:
# Note: You must restart bin/webpack-dev-server for changes to take effect
default: &default
source_path: app/webpacker
source_entry_path: packs
public_output_path: public/packs
cache_path: tmp/cache/webpacker
# Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets']
resolved_paths: []
# Reload manifest.json on all requests so we reload latest compiled packs
cache_manifest: false
extensions:
- .js
- .sass
- .scss
- .css
- .module.sass
- .module.scss
- .module.css
- .png
- .svg
- .gif
- .jpeg
- .jpg
development:
<<: *default
compile: true
# Reference: https://webpack.js.org/configuration/dev-server/
dev_server:
https: false
host: webpacker
port: 3035
public: webpacker:3035
hmr: false
# Inline should be set to true if using HMR
inline: true
overlay: true
compress: true
disable_host_check: true
use_local_ip: false
quiet: false
headers:
'Access-Control-Allow-Origin': '*'
watch_options:
ignored: /node_modules/
test:
<<: *default
compile: true
# Compile test packs to a separate directory
public_output_path: packs-test
production:
<<: *default
# Production depends on precompilation of packs prior to booting for performance.
compile: false
# Cache manifest.json for performance
cache_manifest: true
config/webpack/loaders/sass.js:
loader: 'postcss-loader',
options:
sourceMap: true,
plugins: (loader) => [
require('postcss-cssnext')(
features:
customProperties:
warnings: false
)
]
My files are in this structure:
I hope you are able to help me as this is stopping my development of this app.
Thanks
ruby-on-rails webpack assets webpack-dev-server webpacker
ruby-on-rails webpack assets webpack-dev-server webpacker
asked Mar 7 at 22:11
rctneilrctneil
2,60162857
2,60162857
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
For code reloading by default webpack dev server relies on fsevents, which are not delivered inside docker.
For running inside docker you can switch to polling changes, in webpacker.yml
:
dev_server:
...
watch_options:
poll: 1000
aggregate_timeout: 100
Also try installing latest version of docker, there're reports that fsevents are working in it.
This seems to work nicely. It's a bit slow but i'm very glad it works. Thanks. Any idea why these options are not set by default? and how would i know i needed them?
– rctneil
Mar 11 at 19:25
@rctneil these are not default because evented watch is more efficient than polling(dev server checks if there’re any changes every 1000ms instead of being notified by OS) that is enabled by them, this should be used only when the latter is not working
– Vasfed
Mar 11 at 19:45
Ok, so how do I get evented working rather than the polling?
– rctneil
Mar 11 at 19:47
Evented does not work because of Docker (that’s why suggestion to update it, but it may happen that this will not help and you’ll have to stick with polling) also you can try lowering polling interval, but keep an eye on cpu load, polling with small delay yields higher system load
– Vasfed
Mar 11 at 19:51
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55053633%2fwebpacker-not-compiling-live%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
For code reloading by default webpack dev server relies on fsevents, which are not delivered inside docker.
For running inside docker you can switch to polling changes, in webpacker.yml
:
dev_server:
...
watch_options:
poll: 1000
aggregate_timeout: 100
Also try installing latest version of docker, there're reports that fsevents are working in it.
This seems to work nicely. It's a bit slow but i'm very glad it works. Thanks. Any idea why these options are not set by default? and how would i know i needed them?
– rctneil
Mar 11 at 19:25
@rctneil these are not default because evented watch is more efficient than polling(dev server checks if there’re any changes every 1000ms instead of being notified by OS) that is enabled by them, this should be used only when the latter is not working
– Vasfed
Mar 11 at 19:45
Ok, so how do I get evented working rather than the polling?
– rctneil
Mar 11 at 19:47
Evented does not work because of Docker (that’s why suggestion to update it, but it may happen that this will not help and you’ll have to stick with polling) also you can try lowering polling interval, but keep an eye on cpu load, polling with small delay yields higher system load
– Vasfed
Mar 11 at 19:51
add a comment |
For code reloading by default webpack dev server relies on fsevents, which are not delivered inside docker.
For running inside docker you can switch to polling changes, in webpacker.yml
:
dev_server:
...
watch_options:
poll: 1000
aggregate_timeout: 100
Also try installing latest version of docker, there're reports that fsevents are working in it.
This seems to work nicely. It's a bit slow but i'm very glad it works. Thanks. Any idea why these options are not set by default? and how would i know i needed them?
– rctneil
Mar 11 at 19:25
@rctneil these are not default because evented watch is more efficient than polling(dev server checks if there’re any changes every 1000ms instead of being notified by OS) that is enabled by them, this should be used only when the latter is not working
– Vasfed
Mar 11 at 19:45
Ok, so how do I get evented working rather than the polling?
– rctneil
Mar 11 at 19:47
Evented does not work because of Docker (that’s why suggestion to update it, but it may happen that this will not help and you’ll have to stick with polling) also you can try lowering polling interval, but keep an eye on cpu load, polling with small delay yields higher system load
– Vasfed
Mar 11 at 19:51
add a comment |
For code reloading by default webpack dev server relies on fsevents, which are not delivered inside docker.
For running inside docker you can switch to polling changes, in webpacker.yml
:
dev_server:
...
watch_options:
poll: 1000
aggregate_timeout: 100
Also try installing latest version of docker, there're reports that fsevents are working in it.
For code reloading by default webpack dev server relies on fsevents, which are not delivered inside docker.
For running inside docker you can switch to polling changes, in webpacker.yml
:
dev_server:
...
watch_options:
poll: 1000
aggregate_timeout: 100
Also try installing latest version of docker, there're reports that fsevents are working in it.
edited Mar 11 at 10:26
answered Mar 11 at 10:19
VasfedVasfed
8,993102934
8,993102934
This seems to work nicely. It's a bit slow but i'm very glad it works. Thanks. Any idea why these options are not set by default? and how would i know i needed them?
– rctneil
Mar 11 at 19:25
@rctneil these are not default because evented watch is more efficient than polling(dev server checks if there’re any changes every 1000ms instead of being notified by OS) that is enabled by them, this should be used only when the latter is not working
– Vasfed
Mar 11 at 19:45
Ok, so how do I get evented working rather than the polling?
– rctneil
Mar 11 at 19:47
Evented does not work because of Docker (that’s why suggestion to update it, but it may happen that this will not help and you’ll have to stick with polling) also you can try lowering polling interval, but keep an eye on cpu load, polling with small delay yields higher system load
– Vasfed
Mar 11 at 19:51
add a comment |
This seems to work nicely. It's a bit slow but i'm very glad it works. Thanks. Any idea why these options are not set by default? and how would i know i needed them?
– rctneil
Mar 11 at 19:25
@rctneil these are not default because evented watch is more efficient than polling(dev server checks if there’re any changes every 1000ms instead of being notified by OS) that is enabled by them, this should be used only when the latter is not working
– Vasfed
Mar 11 at 19:45
Ok, so how do I get evented working rather than the polling?
– rctneil
Mar 11 at 19:47
Evented does not work because of Docker (that’s why suggestion to update it, but it may happen that this will not help and you’ll have to stick with polling) also you can try lowering polling interval, but keep an eye on cpu load, polling with small delay yields higher system load
– Vasfed
Mar 11 at 19:51
This seems to work nicely. It's a bit slow but i'm very glad it works. Thanks. Any idea why these options are not set by default? and how would i know i needed them?
– rctneil
Mar 11 at 19:25
This seems to work nicely. It's a bit slow but i'm very glad it works. Thanks. Any idea why these options are not set by default? and how would i know i needed them?
– rctneil
Mar 11 at 19:25
@rctneil these are not default because evented watch is more efficient than polling(dev server checks if there’re any changes every 1000ms instead of being notified by OS) that is enabled by them, this should be used only when the latter is not working
– Vasfed
Mar 11 at 19:45
@rctneil these are not default because evented watch is more efficient than polling(dev server checks if there’re any changes every 1000ms instead of being notified by OS) that is enabled by them, this should be used only when the latter is not working
– Vasfed
Mar 11 at 19:45
Ok, so how do I get evented working rather than the polling?
– rctneil
Mar 11 at 19:47
Ok, so how do I get evented working rather than the polling?
– rctneil
Mar 11 at 19:47
Evented does not work because of Docker (that’s why suggestion to update it, but it may happen that this will not help and you’ll have to stick with polling) also you can try lowering polling interval, but keep an eye on cpu load, polling with small delay yields higher system load
– Vasfed
Mar 11 at 19:51
Evented does not work because of Docker (that’s why suggestion to update it, but it may happen that this will not help and you’ll have to stick with polling) also you can try lowering polling interval, but keep an eye on cpu load, polling with small delay yields higher system load
– Vasfed
Mar 11 at 19:51
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55053633%2fwebpacker-not-compiling-live%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown