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

Try: Replace Webpack with Parcel #215

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Mamaduka
Copy link
Contributor

@Mamaduka Mamaduka commented Jan 15, 2022

Hi, it's me again 👋

I noticed that you were using webpack just to compile SCSS files with JS files as entry points. This is my small experiment, so feel free to ignore it 😄

In this PR, I'm trying to replace Webpack with Parcel 2.

Pros for using Parcel:

  • Almost zero configuration 0️⃣
  • Super fast thanks to the caching ⚡
  • We can eliminate most of the dependencies in package.json 🗑️

I did a quick test and couldn't find regression in design, but this will need to be double-checked.

Performance

Webpack Parcel - no-cache Parcel - cached
CleanShot 2022-01-15 at 13 30 41 CleanShot 2022-01-15 at 13 26 51 CleanShot 2022-01-15 at 13 27 03

Comment on lines +23 to +28
"targets": {
"default": {
"source": ["assets/src/sass/style.scss", "assets/src/sass/style-editor.scss"],
"distDir": "./assets/build/css",
"publicUrl": "/assets/images"
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only configuration it needs.

@ellenbauer
Copy link
Member

Oh, so cool, thank you again, I have not been using Parcel yet. I will check it out and definitely will optimise this. It sounds amazing.

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

Successfully merging this pull request may close these issues.

None yet

2 participants