Sourcemaps for Typescript files not displaying correctly in Chrome using Brunch 2.10.9
See original GitHub issueDescription
Building my Typescript project using brunch does not include correct sourcemapping in the browser anymore. I noticed this starts breaking in 2.10.0 (so I’m using 2.9.1 for now).
Expected behavior
I expect to see Typescript code when I open the mapped files in the browser for debugging.
Actual behavior
Chrome still shows .ts source files, but when I open them the content appears to be the transpiled .js files.
Environment
- Brunch: 2.10.9
- Node.js: 6.9.1
- NPM: 3.10.9
- Operating system: Windows 7
- Code editor: VSCode
package.json
contents
{
"name": "myapp",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"my-other-app": "1.0.0-alpha005"
},
"devDependencies": {
"brunch": "^2.10.8",
"jasmine-core": "^2.5.2",
"javascript-brunch": "^2.10.0",
"less-brunch": "^2.10.0",
"tslint": "^4.5.1",
"typescript": "^2.2.1",
"typescript-brunch": "^2.3.0",
"uglify-js": "^2.8.12"
}
}
brunch config contents
module.exports = {
files: {
javascripts: {
joinTo: {
'js/vendor.js': /^Website.UI\/libs\/vendor\//,
'js/app.js': /^Website.UI\/app\//
},
order: {
before: ['Website.UI/libs/vendor/angular.min.js']
}
},
stylesheets: {
joinTo: 'css/main.css'
},
},
plugins: {
brunchTypescript: {
ignoreErrors: true
}
},
paths: {
watched: ['Website.UI\/app\/', 'Website.UI\/libs\/vendor\/', 'Website.UI\/less\/'],
public: 'Website.UI\/public'
},
modules: {
nameCleaner: (path) => path.replace(/^Website\.UI\/app\//, ''),
autoRequire: {
'js/app.js': ['app']
}
}
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Source maps don't always map back to the original sources.
Description Source maps don't always map back to the original sources. Expected/Actual behavior Example repo: ...
Read more >TypeScript source map files don't work with Chrome
1 and have source maps working correctly in Chrome. My source map begins {"version":3,"file":"pe.plugins.js","sources":[" ...
Read more >source maps for typescript aren't loaded in developers tools
Typescript source files are not showing. I've tried with both Opera and Chrome (both have the same developers tools) but the result is...
Read more >source-map-explorer
Analyze and debug JavaScript (or Sass or LESS) code bloat through source maps. The source map explorer determines which file each byte in ......
Read more >TypeScript debugging in Visual Studio with IE, Chrome and ...
You can't debug TypeScript code in Chrome or Firefox. Ugh. If you set a breakpoint in Visual Studio in a TypeScript file:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It is a well-known source maps issue caused by compiler chaining. Progress in #1664.
Perhaps #1757 solves this?
Update: Now released in v2.10.12