Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

css compilation broken on watch script #250

Open
peterhebert opened this issue Oct 28, 2021 · 2 comments
Open

css compilation broken on watch script #250

peterhebert opened this issue Oct 28, 2021 · 2 comments

Comments

@peterhebert
Copy link

Describe the bug
Normal css compilation via npm run build works fine, but when running the npm run watch task, it breaks the compilation of css assets.

To Reproduce
Steps to reproduce the behavior:

  1. run npm run watch
  2. modify an scss file within src/scss/components/, and save.
  3. build is triggered, but does not compile all the assets. Only CSS that is output is dist/css/components.css. all the other css files are not built, leaving the site unstyled for the most part.

404 errors due to files missing:
dist/css/print.css
dist/css/theme.css
dist/css/state.css
dist/css/layout.css
dist/css/base.css
dist/css/admin.css

similar behavoiur for files under admin, print, and state subfolders (only compiles the css file for that subdir, not the others).

modifying scss files uner layout or theme subdirectories fails to build any css whatsoever.

Only subdirectory where full build runs is in src/scss/base - for instance modifying src/scss/base/_table.scss does trigger a full build of all assets.

Expected behavior
Watch task should compile all assets.

Screenshots
404 errors for expected CSS files in console after build triggered on watch.
image

Desktop (please complete the following information):

  • OS: lunux - Pop!_OS 20.04 LTS
  • Browser: Chrome
  • Version: 95.0.4638.54
@peterhebert
Copy link
Author

Turns out the webpack config was missing watch: true,. Adding this at top of config fixed the issue.

Found solution here: webpack/webpack#6325

// Start configuring webpack.
var webpackConfig = {
  // enable watch
  watch: true,
  // What am i?

@peterhebert peterhebert reopened this Oct 28, 2021
peterhebert added a commit to peterhebert/stanford_basic that referenced this issue Oct 28, 2021
@peterhebert
Copy link
Author

actually, that didn't fix the issue at all... very perplexing...

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

No branches or pull requests

1 participant