Comments (4)
After playing with this a long while, the answer is 'no'... because:
- Parcel was working, including HMR, and is only going to improve overall with Parcel 2.
- Extending @wordpress/scripts' webpack was more setup code than Parcel's (added complexity) and didn't give us any benefits.
- wp/scripts' webpack says it's subject to change (which could be beneficial if we're just inheriting), but the granular integration steps makes our code more brittle.
- wp/scripts only packages JS files, not JSX, PCSS, SASS, or even CSS files -- for concatenation, minification, etc.
- We can use wp/scripts' scripts (e.g. linting and checking licenses) if we want to without needing to extend their webpack.
- WP + React + webpack just isn't giving us HMR without having to define the URI we're running on (lame) or wrap our code with things like
hot()
or import extra<script>
in the entry file's header - Each of our glob-added PostCSS files had an empty or near-empty
style.pcss.json
file generated alongside them, which is cruft. (Unsure which package/command was causing this, but it definitely seemed intentional.)
For reference, we gave it the full effort: https://github.com/cliffordp/cliff-wp-plugin-boilerplate/pull/80/files
from cliff-wp-plugin-boilerplate.
I came across this, thanks for sharing! I've been assessing different building tools/setups for creating Gutenberg blocks.
from cliff-wp-plugin-boilerplate.
Hi, @skorasaurus
Glad you found this. Let me know if there's anything I can do to help.
from cliff-wp-plugin-boilerplate.
A neat little enqueue trick I found along the way, if using WP's webpack: WordPress/gutenberg#18471 (comment)
from cliff-wp-plugin-boilerplate.
Related Issues (20)
- Best practice for enqueue_scripts() HOT 1
- Enforce WordPress Core version constraints
- Replace tric with slic
- Consider implementing BEM
- Implement GitHub Updater
- Build scripts to create new project and publish distributable files (zip)
- Nice way to request a 5-star review
- Make sure composer/vendor does not clash
- Use 'micropackage/requirements' instead of TGMPA HOT 1
- Create a 'renamer' / text replacement generator HOT 4
- Implement micropackage/filesystem
- Implement templating
- Implement micropackage/cache
- Implement arrays utility library instead of our own
- Implement <ServerSideRenderX />
- Implement setup script HOT 2
- Proper namespace HOT 6
- Review the list of assertions that could be added as Utilities functions
- Arrays: consider adding a utility to confirm data structure
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cliff-wp-plugin-boilerplate.