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

SourceMap broken #4

Closed
Toilal opened this issue Mar 21, 2017 · 2 comments
Closed

SourceMap broken #4

Toilal opened this issue Mar 21, 2017 · 2 comments

Comments

@Toilal
Copy link
Contributor

Toilal commented Mar 21, 2017

When using this loader on TypeScript, sourcemaps are broken making debuging impossible.

@Toilal
Copy link
Contributor Author

Toilal commented Mar 21, 2017

To reproduce, vue init https://github.com/Toilal/vue-webpack-template vue-test-sourcemaps (Choose typescript on generation). In the generated project, run npm run dev and then try to debug a TypeScript file inside the browser.

@Toilal Toilal changed the title TypeScript sourceMap broken SourceMap broken Mar 21, 2017
@Toilal
Copy link
Contributor Author

Toilal commented Mar 21, 2017

Same issue without TypeScript, using Babel. I think it's because of escodegen, we need to handle sourcemap when calling generate: https://github.com/estools/escodegen/wiki/Source-Map-Usage.

Toilal added a commit to Toilal/vue-hot-reload-loader that referenced this issue Mar 21, 2017
Toilal added a commit to Toilal/vue-hot-reload-loader that referenced this issue Mar 21, 2017
Toilal added a commit to Toilal/vue-hot-reload-loader that referenced this issue Mar 21, 2017
@ktsn ktsn closed this as completed in #5 Mar 22, 2017
ktsn pushed a commit that referenced this issue Mar 22, 2017
* Add support for sourcemap

Close #4

* Add support for loader sourceMap option and generate sourcemap from scratch when previous sourcemap is undefined

* Avoid defining location/sourceFile parse options when sourceMap is falsy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant