2
votes

I has been experimenting with Aurelia build options vis-a-vis development/build workflow. We have concluded that we prefer that developers test the web site while it is bundled, versus serving up all the individual files to the browser. Additionally, we are using TypeScript. And we want have the browser-side debugging experience provided by source maps. I am working with what will be a large application with many Aurelia components, so the few seconds for the page to refresh during the active development change/refresh or watch cycle seems like it will add up. And it seems that if developers are working in the bundles that bundling issues will be discovered immediately.

Using the Aurelia-cli (v23), and creating a new project using TypeScript, then building creates RequireJS bundles and source maps work for browser debugging. That is, after running au run.

Using the skeleton-typescript-webpack starter project (downloaded two weeks ago), then running npm start also provides browser side debugging of typescript of webpacked bundles.

Using skeleton-typescript which uses jspm and systemjs, running gulp serve-bundle does not provide client side typescript debugging. However, gulp serve does provides client side debugging, but the site is not bundled. The only difference between those gulp tasks is that the site is bundled, versus unbundled.

So it seems that typescript source map client side debugging of bundled sites will work with Aurelia-cli and webpack, but not with jspm.

Our project was started based on the skeleton-typescript. Before we refactor the build workflow, I have attempted to figure out how to get jspm to support typescript debugging on the browser.

I've hunted the web, but did not find any clear direction, and did much experimentation with configuration settings with a trial and error approach, but cannot seem to get a bundled jspm site to allow the client side typescript debugging experience.

Is this a limitation of jspm or systemJS or the Aurelia-Bundler? Or is there some configuration setting, in config.js or bundles.js, I need to add to the skeleton-typescript starter project to get this to work?

1

1 Answers

0
votes

Maybe your are not getting access to source maps. I'm not sure, I remenber something about the way how source map are generated, (inline, file in a specific folder) and add mapping path in the server to make them acessible.

https://github.com/aurelia/skeleton-navigation/blob/master/skeleton-typescript-aspnetcore/src/skeleton/Startup.cs#L69-L74