aurelia / cli

The Aurelia 1 command line tool. Use the CLI to create projects, scaffold components, and bundle your app for release.
MIT License
407 stars 133 forks source link

HTML Source Maps not being created correctly #409

Closed AshleyGrant closed 7 years ago

AshleyGrant commented 7 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior:

Source maps for HTML files are not being added to app-bundle.js.map correctly. There are two issues.

This issue affects both TypeScript and JavaScript applications.

EisenbergEffect commented 7 years ago

@AshleyGrant Seems like you figured out what was going wrong. Is the fix pretty straight forward? Any chance of a PR?

AshleyGrant commented 7 years ago

The only thing I've figured out so far is that I'm not exactly sure how source maps worked in the first place. The two lines here: https://github.com/aurelia/cli/blob/master/lib/build/concat-with-sourcemaps/index.js#L2 require from a module called source-map, but that doesn't seem to be a dependency of the CLI.

Any idea how this is working? source-map is in my node_modules folder, but I need to figure out what is causing it to be installed.

AshleyGrant commented 7 years ago

Well, nevermind. I figured that out. It is a dependency of gulp-sourcemaps which is a dev dep of an Aurelia CLI project, so that explains how that works.

EisenbergEffect commented 7 years ago

It's coming in from another dependency. I can't remember which one though. It might be coming from gulp-sourcemaps or something like that.