I’m new to developing Atom packages, and I’m working on writing my first one. I want to import a dependency from NPM that uses the ES6 module syntax, but unfortunately Atom doesn’t seem to like it very much.
I’m working from the template generated by “Package Generate: Generate Package”, which has
This is all very well, but if I want to import from an NPM package that uses the ES6 module syntax, Atom doesn’t appear to be clever enough to do the same for dependencies, and I get this error if I try to import something in an NPM package that uses ES6 module syntax itself:
Must use import to load ES Module: FILEPATH_HERE
This is especially strange, since Node.js for a while now has not required the extra
--experimental-modules flag to enable native ES6 module support.
atom -v shows this:
Atom : 1.55.0 Electron: 6.1.12 Chrome : 76.0.3809.146 Node : 12.4.0
My question is this: How can I import a package from npm that uses the ES6 module syntax itself?