MKHenson / hatchery-editor

Engine for building, deploying and sharing web apps within the Webinate community
GNU General Public License v2.0
0 stars 0 forks source link

Rollup & commonJS modules #57

Open MKHenson opened 8 years ago

MKHenson commented 8 years ago

It would be preferable if we could use npm to install third party dependencies instead of our custom methods. Using the guide I found here, we could easily port each of the dependencies into normal nodejs commonjs modules that can be imported from our code directly. In order to achieve this, we need to add the relevant plugins and update our gulp file.

MKHenson commented 8 years ago

Currently this does not look possible - at least using rollup - as rollup requires the modules be written in ES6. Even with plugins to understand commonjs the tool is not able to resolve dependencies. I used react as an example and gave up after hours of frustration. Park this until es6 modules arrive.