Skip to content

fix: handle webpack source maps when library is set #264

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

Merged
merged 1 commit into from
Sep 9, 2019

Conversation

rosen-vladimirov
Copy link
Contributor

In case the library path is set in webpack.config.js file, the URLs in sourceMaps are generated in a way that is not expected for our parser - currently we expect webpack:///<path>, while it becomes webpack://<library>/<path>.
To handle this, add the correct sourceMapPathOverrides in case the user had not specified it already.

Add unit tests and add as devDependency @types/sinon. However, the project cannot be transpiled with the current TypeScript version (2.6) when this package is installed, so update TypeScript to latest version.
Use proxyquire in the tests to mock the require of the webpack.config.js file.

Fixes #263

In case the `library` path is set in webpack.config.js file, the URLs in sourceMaps are generated in a way that is not expected for our parser - currently we expect `webpack:///<path>`, while it becomes `webpack://<library>/<path>`.
To handle this, add the correct sourceMapPathOverrides in case the user had not specified it already.

Add unit tests and add as devDependency `@types/sinon`. However, the project cannot be transpiled with the current TypeScript version (2.6) when this package is installed, so update TypeScript to latest version.
Use proxyquire in the tests to mock the require of the webpack.config.js file.
@rosen-vladimirov rosen-vladimirov merged commit b4b8f0a into master Sep 9, 2019
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-webpack-lib branch September 9, 2019 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to debug applications when output.library in webpack.config.js is set
2 participants