cyclejs-community / one-fits-all

The one-fits-all flavor for create-cycle-app
MIT License
34 stars 8 forks source link

Emit source maps #88

Closed anilanar closed 5 years ago

anilanar commented 6 years ago

Currently there is no way of generating source maps for a bundle.

1) Emit them always. 2) Replace https://github.com/cyclejs-community/one-fits-all/blob/4bfe0bd6bfabc4f1d65fb9a7166d437b7a24b4d7/scripts/build.js#L6 as env.NODE_ENV = env.NODE_ENV || 'production'; so that NODE_ENV=development cycle-scripts build works which will emit source maps. I think this is not ideal because I may want to emit source maps for production build. One very valid use case is using https://www.npmjs.com/package/source-map-explorer to analyze bundle size. 3) Emit them conditionally given an additional argument to cycle-scripts build.

jvanbruegge commented 5 years ago

You can add custom configuration to the webpack.config.js in the app directory, so just configure the sourcemaps there