madskristensen / BundlerMinifier

Visual Studio extension
Other
616 stars 173 forks source link

Source map files are not created when the JavaScript file was generated from TypeScript #505

Open cas4 opened 4 years ago

cas4 commented 4 years ago

Installed product versions

Description

Source map files are not created for JavaScript files that are generated from Typescript.

Steps to recreate

  1. Create a new MVC Core 3.1 web application
  2. Create a test.ts Typescript file and save it. The JavaScript file is auto-generated by VS
  3. Edit the bundleconfig.json file to minify the JS file:
    {
    "outputFileName": "wwwroot/js/test.min.js",
    "inputFiles": [ "wwwroot/js/test.js" ],
    "minify": { "enabled": true }
    "sourceMap": true
    }
  4. Compile the project
  5. The test.min.js file is created, but the test.min.js.map file is not

Current behavior

The minified source map file is not being generated

Expected behavior

A map file for the minified JavaScript should be generated to allow for browser debugging.

ericop commented 3 years ago

I've been having a similar issue, and this wasn't always the case