We use buble to do our code transpilation, in both good and bad ways it adheres very closely to ES2015 specifications, and throws errors if we try to use import (an ES2015 reserved word) in the way that Webpack needs.
This is not a huge deal, as we can still use the Webpack require.ensure code splitting, but it would be nice to have to make our asynchronous code splitting natively Promise driven.
There are two possible solutions:
Try to make webpack look for something other than import() and use a different keyword for our asynchronous code splitting.
Fork/modify Buble to allow the webpack import() syntax, and submit upstream.
Summary
We use buble to do our code transpilation, in both good and bad ways it adheres very closely to ES2015 specifications, and throws errors if we try to use
import
(an ES2015 reserved word) in the way that Webpack needs.This is not a huge deal, as we can still use the Webpack
require.ensure
code splitting, but it would be nice to have to make our asynchronous code splitting natively Promise driven.There are two possible solutions:
import()
and use a different keyword for our asynchronous code splitting.import()
syntax, and submit upstream.