-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SourceMaps to minified JS #4276
Conversation
I'm not a Webpack expert, but should we also adapt the devtool: devMode ? 'eval-cheap-module-source-map' : 'source-map', |
@gcauchon I don't think so. The reason is that this is a decision that the user of the framework should make:
|
I am a moron.
|
@rktjmp I don't think so. The linked PR is for the phoenix generator. This PR only looks at the JS packaged with phoenix. |
Rebased to current |
Rebased to current |
Amended compiled JS & Source Maps as discussed with @bcardarella |
I believe if you add to this block phoenix/installer/lib/phx_new/single.ex Lines 89 to 97 in dcc9398
--no-webpack projects this PR should be ready to merge.
|
❤️❤️❤️🐥🔥 |
As discussed in https://groups.google.com/g/phoenix-core/c/Dk2AbXVnzeg
When running
npm run build
, this will:priv/static/phoenix.js
pointing to the sourcemappriv/static/phoenix.js.map
I have verified that when using webpack in your application, it will incorporate this sourcemap and therefore create better error stacktraces.