hayes0724 / shopify-packer

Modern development tool for Shopify using Webpack 5. Easy to extend and customize, zero build config, compatible with Slate and existing websites.
https://hayes0724.github.io/shopify-packer/
MIT License
181 stars 37 forks source link

[BUG] SCSS and JS not compiling on "packer start" #69

Closed marioloncarek closed 3 years ago

marioloncarek commented 3 years ago

Describe the bug Hello and thanks for creating this great tool. Love it. I found a bug when running "packer start", its not compiling scss and js, but in terminal i see that changes are detected. But when running packer build, changes are then compiled and working as expected. Can you please help?

To Reproduce Steps to reproduce the behavior:

  1. run packer start
  2. change scss or js
  3. nothing changes, new files are not compiled both on localhost with hmr or preview via shopify admin
  4. close terminal session
  5. run packer build
  6. run packer deploy
  7. changes are compiled and visible

Expected behavior When you change scss or js file, it get compiled and changes visible on localhost or preview via admin

Screenshots If applicable, add screenshots to help explain your problem.

System (please complete the following information):

Packer (please complete the following information):

Theme (please complete the following information):

hayes0724 commented 3 years ago

With the recent upgrade to webpack 5 internally I have noticed this issue and a few others running in development mode (start/watch) in some of the recent versions, can you run packer -v and post the exact version?

marioloncarek commented 3 years ago

@hayes0724 Shopify Packer - v2.0.12

hayes0724 commented 3 years ago

Thanks for the feedback, I was able to recreate and this was a quick fix. The source maps were incompatible with hmr.

fixed in v2.0.13

marioloncarek commented 3 years ago

@hayes0724 can you please write me a quick explanation how to update that on existing project? or i need to re-create the whole project? thanks for this!

hayes0724 commented 3 years ago

Packer should be installed globally (unless you need a specific version for one project) so use global update/upgrade command

yarn

yarn global upgrade @hayes0724/shopify-packer

npm

npm update -g @hayes0724/shopify-packer

Also you should be able to update the version of packer without creating or changing your local project.

marioloncarek commented 3 years ago

@hayes0724 thank you so much, this tool is so sick! Best i tried. Really appreciate it!

marioloncarek commented 3 years ago

@hayes0724 sorry for bothering you, unfortunately i update to 2.0.13 and its still not working for me, i will now try to recreate the project and try

hayes0724 commented 3 years ago

You may need to delete the dist folder before running start. Webpack clean sometimes leaves files on development build unless they are deleted. It used to delete everything after each compile but I disabled this since it increase start/watch dev time significantly

marcelaerts commented 3 years ago

I have the same issues. I'm running on v.2.1.3. Deleting the dist folder is not working. On "packer start" the file layout.theme.css isn't generated.

marioloncarek commented 3 years ago

@marcelaerts actually updating did not fix the issue for me, i needed to start a new packer project, did not find a way to fix it on current project, i think something with assets was killing my webpack