Open Delagen opened 8 years ago
When used manually min version all OK
imports?this=>window&module=>undefined&exports=>undefined&define=>undefined!angular-cache/dist/angular-cache.min
Still not solved
The source maps are generated by Rollup.js. I don't have any idea what to do about this.
I think this is due paths with parenthesis (../) in paths or other issue
I think you can postprocess source file with something like
uglifyjs dist/angular-cache.js --in-source-map dist/angular-cache.js.map -o dist/angular-cache.min.js --source-map dist/angular-cache.min.map --source-map-root=dist --source-map-url angular-cache.min.map --source-map-include-sources -v -b --comments all
Which of the two source maps is the one that you're saying is corrupted?
angular.js.map that for unminified dist
Issue is still there. I've run into the same bug with webpack 2.2. Defining babel loader for this file solves it but I don't want to add babel only for one lib.
My workaround was to alias this module to the .min.js
file in my webpack.config.js
:
{
resolve: {
alias: {
'angular-cache': path.resolve(__dirname, 'node_modules/angular-cache/dist/angular-cache.min.js'),
}
}
}
A couple of other issues related to this module's source maps:
.js
file should be named "angular-cache.min.js.map". Currently it is named "angular-cache.min.map". This doesn't break anything, but it's not the standard naming convention.Cannot find source file 'dist/angular-cache.js'
. Changing all occurrences of "dist/angular-cache.min.js" to "angular-cache.min.js" in the .min file ("angular-cache.min.map") fixes this error.From https://github.com/mozilla/source-map/issues/247 comments:
Changing preact to use a newer version of rollup fixed the preact source map.
Might need to do the same here.
From mozilla/source-map#247 comments:
In particular I was following: https://github.com/rollup/rollup/issues/1254
Error when using with webpack with source-map-loader
imports?this=>window&module=>undefined&exports=>undefined&define=>undefined!angular-cache