-
Notifications
You must be signed in to change notification settings - Fork 123
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
[don't merge] Source maps on server.js #451
Conversation
@@ -8,6 +8,7 @@ var BabiliPlugin = require('babili-webpack-plugin'); | |||
|
|||
module.exports = function webpackConfigGenerator(params){ | |||
return { | |||
devtool: '#source-map', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not cheap-module-eval-source-map
? https://webpack.js.org/configuration/devtool/#devtool
I managed to spend some time on this and I think I made some progress, but still a wip. In general, there are a couple of things that I had to change:
There are 2 more blockers in order to fully make debugging in vscode work:
For reference, this is the {
"version": "0.2.0",
"configurations": [
{
"name": "Magic",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/../oc/src/oc-cli.js", // this is my local experimental oc
"outFiles": ["${workspaceRoot}/error-page/_package/*.js" ],
"cwd": "${workspaceRoot}/",
"args": [ "dev", ".", "3030" ],
"stopOnEntry": false,
"sourceMaps": true
}
]
} It is worth noting that according to the docs I should use I'll keep digging :) |
Another update! I think I fixed blocker n.2. Said that, it looks like the only remaining blocker is babili plugin. By enabling it back, I can't get anything working. |
I got a local copy that tackles 1. by running babili as preset instead of plugin. The downside is that the final dimension is slightly bigger, but it all works well with the debugger, so I think it is acceptable. |
For #1 are you replacing babili with the provided webpack uglify plugin? I think we might want to just set the env preset to target es2015 and safely use the uglify plugin on that. |
Yes, that's the plan. That's definitely another option. The thing we need to ensure, is that the final source map allows us to get back to the very initial structure for allowing debugging - which I understand is complicated. |
Yes. Actually I was thinking that perhaps we should minify/optimize only upon publishing, no need for that while on |
As discussed with @nickbalestra this is now very close to be ready. |
Closing because of a newly branch and PR: #825 |
Fixes #440
Still a WIP because I want to do some manual QA. Let's pair on this next week @nickbalestra