-
Notifications
You must be signed in to change notification settings - Fork 122
How to inline sourceMap into source #547
Comments
the sourceMaps parameter should be 'inline', not just true. so:
Note that due to traceur being used in the pipeline, the sourcemaps will probably be off. See #489. |
Thanks. I tried it, but seems like it doesn't work: const builder= new jspm.Builder();
builder.config({ sourceMaps: 'inline' })
builder.buildStatic(testFileGlobs)
.then((output) => {
fs.writeFileSync('out.js', output.source.toString());
}); The |
Forgive me if I'm missing something obvious, but where is your TypeScript configuration specified? |
No Problem. I would wish it is a stupid mistake on my side (so I can get it working quickly. 😏) {
"compileOnSave": false,
"buildOnSave": false,
"compilerOptions": {
"module": "system",
"moduleResolution": "node",
"noImplicitAny": false,
"outDir": "dist",
"sourceMap": true,
"baseUrl": ".",
"paths": {
...
}
},
"atom": {
"rewriteTsconfig": false
},
"exclude": [
"dist",
"node_modules",
"jspm_packages",
"typings/browser",
"typings/browser.d.ts"
]
} And in SystemJS.config({
transpiler: "plugin-typescript",
typescriptOptions: {
"tsconfig": true
},
... |
Not sure about this, but you might want to try specifying your options on the buildStatic call itself rather than doing builder.config.
Based on the sourcecode for builder.js, it seems that builder.config sets the loader config. |
@unional Try adding {
"inlineSourceMap": true
} |
Yes, nice!!! Thanks @mikeyoon @aluanhaddad. Turns up just
|
Actually, might be not. Because my tests and source code are in typescript. |
Oops. Said too soon. #489 (comment) |
In either way, this can be closed. Thanks. 🌹 |
Seems like it is not mentioned in any docs. Reopen to track doc update. |
Sorry if this is a dumb question. I want to run tests on browser with
typescript
+jspm
+tap-run
:This works. However when there is an error, the stack would not be very helpful:
So I want to add the sourceMap and embed it so that it can show stack trace on where it actually fail in the source code.
Is the sourceMap the right approach?
The text was updated successfully, but these errors were encountered: