Closed anilanar closed 5 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.
env.NODE_ENV = env.NODE_ENV || 'production';
NODE_ENV=development cycle-scripts build
cycle-scripts build
You can add custom configuration to the webpack.config.js in the app directory, so just configure the sourcemaps there
webpack.config.js
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 thatNODE_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 tocycle-scripts build
.