[wp-trac] [WordPress Trac] #40834: Introduce a JS module pattern to WordPress
WordPress Trac
noreply at wordpress.org
Tue Jun 13 20:40:36 UTC 2017
#40834: Introduce a JS module pattern to WordPress
-------------------------+------------------------------
Reporter: omarreiss | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by jhabdas):
My .02 is that WordPress already has a great module system whereby users
can enqueue anything they want. I've personally worked on both enterprise
React projects and have published React Native to iOS, both of which
included extensive use of Webpack. My personal experience as a developer
was not a happy one.
Webpack is very complex IMO, and is a slippery slope WRT the involvement
of Babel and friends. If the goal is to provide more modularity in the
core to start moving towards ES6 I don't see why you'd need a bundler to
do that when browsers will be able to support ES6 modules natively
(whereas Node will not anytime soon, and the Node EPS will show the gory
tale).
UMD already provides quite a bit of bloat. If you skip straight to ES6 you
can use the browser as your REPL and leverage advanced loading techniques
coming such as WHATWG Dynamic Imports to leapfrog beyond many emerging
frameworks. Building on Node is not easy. Just ask the folks from Ghost
Foundation.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40834#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list