-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Source maps not parsing with Webpack #877
Comments
Try changing this: {
test: /\.tsx?$/,
use: ['awesome-typescript-loader']}, to {
test: /\.(tsx|ts)?$/,
use: ['awesome-typescript-loader']}, Or try ignoring the node_modules folder(which should be done anyway): {
test: /\.(tsx|ts)?$/,
exclude: /node_modules/,
use: ['awesome-typescript-loader']}, |
Thanks for the tip. I changed that but it still didn't work. However, I think I know why it breaks. The It gets tripped up on the My dumb brain said that obviously we should process the Changing this
to
will just bundle the file as-is without trying to process it in any way. It just tripped me up because apparently this is a pretty uncommon problem since noone really intentionally loads Now the real question is how to get it so that the addon files don't get bundled by webpack and cause unnecessary bundle bloat and funky errors. I don't know if it would be better to do a PR or if there is some webpack config option that I am missing. |
@jclangst thanks for reporting this. A PR is definitely welcome if there is a transparent way of fixing this. Just mentioning that we are using the |
I had the very same issue, even though I wasn't using source-map-loader. I was able to get rid of the warnings by using the webpack
Possibly this aproach could also be used to prevent webpack from bundling the other addons. |
Here's another possible solution: use new webpack.IgnorePlugin(/^\.\/.*js.map$/ ,/.*xterm\/lib\/addons/), |
Fixes xtermjs#877 Webpack is guessing what files to bundle and attempts to load source maps. Explicity specifying the js extension fixes this.
I'm consolidating all bundling/loadAddon related issues into #1018, please comment on that issue if you have thoughts 😃 |
Receiving parse errors when bundling project with Webpack. In particular, it does not look like the
source-map-loader
Webpack loader is correctly parsing the source maps in the project.Details
Steps to reproduce
The project works fine if I redirect the
main
option in thepackage.json
todist/xterm.js
and also works if I delete thesearch.js.map
andSearchHelper.js.map
files. However, I would ideally like to preserve the package's integrity to maintain portability to other devices.The text was updated successfully, but these errors were encountered: