James Gillmore
Jul 23, 2017 · 2 min read

I would hope so, but I can’t say for sure. I personally don’t care. If webpack makes it possible is all I care about. They already create chunks based on magic comments — that’s not in any spec. Being spec-compliant is important to a point. It’s about degree, not black or white. If being fully spec compliant means you can’t do an obvious best path, then who cares. But try your best to be spec compliant and fill in what needs to be filled in as necessary — that’s what I mean by it’s about “degree.” That’s my view. At the end of the day Webpack basically paved the road for this spec — code splitting didn’t exist before Webpack (at least not at that scale of usage).

In addition custom babel plugins is exploding, and people have gotten comfortable using them. What matters is we’re following idiomatic best practices as best as possible. If we aren’t fully spec compliant, maybe we will be through shear usage, i.e. proving the path is valuable — again just like Webpack did by pioneering code splitting to the point that it got a spec for an import() method.

  • Right now this is a way that makes sense to get this job done.
  • When Webpack incorporates it, that will be what makes most sense. And maybe they’ll do it sooner (it’s far down a long roadmap) thanks to what I’ve done to get this in peoples’ hands now.
  • And perhaps because Webpack incorporates it, the spec will change to address this. I wouldn’t be surprised if that happened — my view is: THIS IS THE WAY SPLITTING IS SUPPOSED TO BE DONE.
    James Gillmore

    Written by

    http://www.faceyspacey.com + http://twitter.com/faceyspacey