zambezi / caballo-vivo

Glue code for pure RxJS applications to connect with React-Router, and other operators
2 stars 7 forks source link

Minimalist build target in order to use it in node js / electron #20

Closed cristiano-belloni closed 5 years ago

cristiano-belloni commented 5 years ago

As easy as:

"build": "babel src -d dist",

in package.json

cristiano-belloni commented 5 years ago

...then we can think about publishing only dist, or publishing src and dist, or changing the index in package.json

cristiano-belloni commented 5 years ago

The way we're bundling this, it will not be optimised by Webpack. Speaking with @ollyhayes, we have this plan of action to try:

1 - Relax the versions 2 - Have a index.js importing the whole library, as the main entrypoint 3 - Build the library for commonjs and put it in the lib-commonjs directory 4 - Point main in package.json to lib-common-js 5 - Point module in package.json to src

Also, let's take a look at sideEffects here: https://webpack.js.org/guides/tree-shaking/

cristiano-belloni commented 5 years ago

on module: https://stackoverflow.com/questions/42708484/what-is-the-module-package-json-field-for

cristiano-belloni commented 5 years ago

Worth exploring https://github.com/rollup/rollup-starter-lib