Git Product home page Git Product logo

Comments (4)

cliffordp avatar cliffordp commented on September 3, 2024

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.

skorasaurus avatar skorasaurus commented on September 3, 2024

I came across this, thanks for sharing! I've been assessing different building tools/setups for creating Gutenberg blocks.

from cliff-wp-plugin-boilerplate.

cliffordp avatar cliffordp commented on September 3, 2024

Hi, @skorasaurus

Glad you found this. Let me know if there's anything I can do to help.

from cliff-wp-plugin-boilerplate.

cliffordp avatar cliffordp commented on September 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.