evanw / evanw/node-source-map-support
Could multiple lines added to the generated code throw this off?
- 主要言語
- JavaScript
- スター
- 2.2k
- フォーク
- 223
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I'm inserting multiple lines at the top of a Webpack bundle for the sake of making this work when I load the bundle in Meteor, like so:
``` js
require("source-map-support/register");
var Npm = Meteor.__mwrContext__.Npm;
var Assets = Meteor.__mwrContext__.Assets;
delete Meteor.__mwrContext__;
var require = Npm.require;
/******/ (function(modules) { // webpackBootstrap
```
The other lines are hacks that allow me to `require` the bundle (Meteor normally loads all server files via `vm.callInThisContext`. I assume that `source-map-support-will` only work if the file is required in as a module like this (if there's another way, let me know).
However one of my users reported the following error https://github.com/jedwards1211/meteor-webpack-react/issues/86:
```
/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-consumer.js:281
W20151007-12:26:26.964(-4)? (STDERR) throw new TypeError('Column must be greater than or equal to 0, got '
W20151007-12:26:26.964(-4)? (STDERR) ^
W20151007-12:26:26.964(-4)? (STDERR) TypeError: Column must be greater than or equal to 0, got -23
W20151007-12:26:26.964(-4)? (STDERR) at SourceMapConsumer_findMapping as _findMapping
```
Could this be caused by the extra lines I added to the top of the bundle? I've read some about how source maps work, but I think you would be more prepared to answer this question than me. Thanks!
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
source-map-consumer.js の 281 行目付近を読み、レポートに示されている先頭に追加された行を含む生成済みの Webpack バンドルを調査してください。これらの行がある場合とない場合で stack-trace の失敗を再現してください。完了条件は、バンドルの変更が負の列を引き起こすかどうかを判断してその結果を文書化すること、またはリポジトリが対応している場合は対象を絞ったカバレッジを追加することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js, webpack
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100