aurelia / skeleton-navigation

Starter kits for building a standard navigation-style app with Aurelia.
Creative Commons Zero v1.0 Universal
732 stars 512 forks source link

No source maps running skeleton esnext webpack in development mode in certain browsers #713

Closed stevies closed 7 years ago

stevies commented 7 years ago

I'm submitting a feature request

When running webpack skeleton in development mode, there are no sourcemaps, so code breakpoints or debugger statements don't work.

Old skeleton had

{devtool: '#inline-source-map'}

entries in the webpack.config.js files. Not sure how to add similar to the new webpack.config.babel.js file to turn on the sourcemaps.

stevies commented 7 years ago

Ah - I see it now:

  ENV === 'test' || ENV === 'development' ?
    envDev(ENV !== 'test' ? {} : {devtool: 'inline-source-map'}) :

should be:

  ENV === 'test' || ENV === 'development' ?
    envDev(ENV === 'test' ? {} : {devtool: 'inline-source-map'}) :

Turn on source maps for development, not for test.

niieani commented 7 years ago

Actually no, the behavior is correct. inline-source-map has to be used for test because of coverage reporting. Putting {} doesn't disable the devtool, just uses the default one (see the related easy-webpack). But it might be that the default sourcemap tool doesn't work in your browser. Both Chrome and FF has an issue with one or another I think, so it's hard to get it working consistently across browsers.

I'd love a pull request to easy-webpack with a better default, if you can find out which one works best.

niieani commented 7 years ago

New skeletons should have solved this.