★ wanayoo — archive 1999 https://github.com/angular/material-tools/pull/38Nouvelle recherche | Portail wanayoo
Skip to content
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

Generate correct sourceMapUrl #38

Open
wants to merge 1 commit into
base: master
from

Conversation

@alexthewilde
Copy link

@alexthewilde alexthewilde commented Feb 6, 2019

All minified files are created with an invalid sourceMapUrl path. I.e. instead of a relative file.map it uses an absolute local file path like path/on/my/disk/to/file.min.js.

Browsers then complain about the invalid source map and actually reveal the local path in the dev console (!)

Copy link
Member

@Splaktar Splaktar left a comment

Sorry for the delay in looking at this.

Can you please fix these minor lint errors?

Also can you please provide before and after example output for the SourceMapUrl?

@@ -13,6 +14,10 @@ export class JSBuilder {
let mainModule = this._buildMainModule(data.dependencies._mainModule);
let raw = data.files.js.map(path => fse.readFileSync(path).toString()).join('\n');

This comment has been minimized.

@Splaktar

Splaktar May 10, 2019
Member

path here now causes a lint error:

ERROR: /home/travis/build/angular/material-tools/lib/builders/JSBuilder.ts[15, 33]: Shadowed name: 'path'

Can you please rename this path variable to file?

@@ -13,6 +14,10 @@ export class JSBuilder {
let mainModule = this._buildMainModule(data.dependencies._mainModule);
let raw = data.files.js.map(path => fse.readFileSync(path).toString()).join('\n');
let source = [mainModule, '', raw].join('\n');

// Create source map filename from given minified filename
filename = path.basename(filename).replace(/\.min\.js/, '.map')

This comment has been minimized.

@Splaktar

Splaktar May 10, 2019
Member

This is causing a lint error:

ERROR: /home/travis/build/angular/material-tools/lib/builders/JSBuilder.ts[19, 68]: Missing semicolon
@Splaktar
Copy link
Member

@Splaktar Splaktar commented Jan 9, 2020

Just wanted to drop a note here to remind you that there are some outstanding changes needed to this PR before we can merge it. Thank you.

@Splaktar Splaktar modified the milestones: 1.0.0, Backlog, 1.0.1 Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.