Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.

how to generate sourceMaps for production mode? #10

Closed
zaggino opened this issue Apr 11, 2015 · 5 comments
Closed

how to generate sourceMaps for production mode? #10

zaggino opened this issue Apr 11, 2015 · 5 comments

Comments

@zaggino
Copy link

zaggino commented Apr 11, 2015

No description provided.

@bradleyboy
Copy link
Owner

Open conf/webpack.production.js and change it to:

module.exports = require('./make-webpack-config')({
  production: true,
  devtool: 'source-map'
});

Then when you build, sourcemaps will be generated for both CSS and JS.

@zaggino
Copy link
Author

zaggino commented Apr 11, 2015

thanks a lot, commented out line in code could be also useful for others... i've just started exploring devpack coming from browserify :) i've gone through a few starters but yours is the first one not overcomplicating things (except the most basic one)

@tshddx
Copy link

tshddx commented Apr 14, 2015

Is this supposed to generate maps with the actual ES6 code, before transpilation? It doesn't seem to have any effect for me. With or without the source-map options, I can still see all my index.jsx files in the Chrome Sources tab, but they are post-transpilation.

@bradleyboy
Copy link
Owner

@BadDox Is this in production or development? In development, eval is used, which will show the sourcemap post-transpilation. You can change that by editing the devtool setting in conf/webpack.config.js:

module.exports = require('./make-webpack-config')({
  devtool: 'eval-source-map',
});

Keep in mind that the compilation and rebuilds will be slightly slower with that setting. More on the devtool options can be found in the webpack docs.

@tshddx
Copy link

tshddx commented Apr 17, 2015

Indeed, that was my issue in development.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants