Hey,
I’m looking into upgrading from 1.2 to 1.3. Our app consists of multiple packages, so we can go package-by-package. However, even a single package can be quite large. Too large to change it all at once.
Can we have a combination of the old-style (globals) with new-style (es6 modules) approach within one package?
As a quick experiment I tried just changing one file (wherein a collection was defined) by:
-Moving it out of the package.js definition
-Inside the file, instead of binding to our global namespace which is exported using api.exports, I export it using the es6 module syntax
-Everywhere I used the global, I now use an es6-style import.
The import statement seems to get translated to ‘require’ statements in the build process and I get this error:
ReferenceError: require is not defined
…
Am I doing something wrong or is this not possible?