components: release: incorrect sourcemaps
In previous releases like alpha.4
, the sourcemap paths were correctly resolved in relative to the transpiled file.
This has changed in alpha.5
.
//# sourceMappingURL=/usr/local/google/home/jelbourn/material2/tmp/broccoli_type_script_compiler-input_base_path-IydvmmBU.tmp/0/components/slide-toggle/slide-toggle.js.map
Since, the sourcemap paths are not valid anymore, SystemJS is not able to create a bundle of Angular Material 2 components. (applies also to the CLI - uses SystemJS builder as well).
I temporary fixed this, by stripping the souremap paths out of the components.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 8
- Comments: 18 (2 by maintainers)
Commits related to this issue
- Added npm-shrinkwrap to address systemjs-builder issue with ng-material2 sourcemaps * Ref: https://github.com/angular/material2/issues/541 — committed to lifan0127/nih-nutrition by lifan0127 8 years ago
Stripping out sourcemap paths works, as per @DevVersion. Quick cmd to do so:
Linux:
FreeBSD/OSX:
@guybedford Have you managed to make it work?
Just using the most recent SystemJS version (0.19.31 right now) in my
package.json
and rebuilding withng build -e prod
doesn’t seem to fix it, still getting the error.@vincentpalita In SystemJS Builder
v0.15.19
, you’re able to properly disable the sourceMaps validation / tracing. See systemjs/builder#612@vincentpalita Not only the overlay is affected. Generally all distribution files are affected.
I just added this file to my build process which works really well.
@ofuangka thanks for reporting my typo here 😃 I don’t use angular-cli, but it sounds strange that you had to change this inside the module’s dependencies.
I would recommend to use a npm-shrinkwrap.json as below instead:
This allow you to fix a dependency for a module.