Webpack source map only showing entry files The Next CEO of Stack OverflowHow can I debug modular TypeScript with source maps?How to load all files in a directory using webpack without require statementsHow to include untyped node modules with Typescript 1.8?Typescript Source not showing when using webpack ts-loaderServing static images with WebpackCannot produce external source map with webpack2How to fix HTML file comments not being ignored by Webpack Dev Server?Webpack production build fails : “Can't resolve 'aws-sdk'”Got “TS2300: Duplicate identifier 'Account'” error after upgraded to Typescript 2.9.1Where does source-map-loader fit into TypeScript compilation with Webpack?

Is there a way to save my career from absolute disaster?

Why isn't the Mueller report being released completely and unredacted?

Why specifically branches as firewood on the Altar?

Is it convenient to ask the journal's editor for two additional days to complete a review?

Do I need to write [sic] when a number is less than 10 but isn't written out?

What did we know about the Kessel run before the prequels?

Using Rolle's theorem to show an equation has only one real root

Proper way to express "He disappeared them"

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Would a completely good Muggle be able to use a wand?

Method for adding error messages to a dictionary given a key

Why don't programming languages automatically manage the synchronous/asynchronous problem?

Flying from Cape Town to England and return to another province

Why, when going from special to general relativity, do we just replace partial derivatives with covariant derivatives?

Legal workarounds for testamentary trust perceived as unfair

Which one is the true statement?

Defamation due to breach of confidentiality

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin

How do I align (1) and (2)?

Yu-Gi-Oh cards in Python 3

How did people program for Consoles with multiple CPUs?

How to avoid supervisors with prejudiced views?

Easy to read palindrome checker

Axiom Schema vs Axiom



Webpack source map only showing entry files



The Next CEO of Stack OverflowHow can I debug modular TypeScript with source maps?How to load all files in a directory using webpack without require statementsHow to include untyped node modules with Typescript 1.8?Typescript Source not showing when using webpack ts-loaderServing static images with WebpackCannot produce external source map with webpack2How to fix HTML file comments not being ignored by Webpack Dev Server?Webpack production build fails : “Can't resolve 'aws-sdk'”Got “TS2300: Duplicate identifier 'Account'” error after upgraded to Typescript 2.9.1Where does source-map-loader fit into TypeScript compilation with Webpack?










0















For a bit of background this is attempting to setup Typescript support in an existing (.NET) application.



Here is the file structure:



scripts
| - ts
| | - app.ts
| | - file.ts
| - .gitignore
| - package.json
| - tsconfig.json
| - webpack.config.js


When I build with webpack (see below) my source map only shows app.ts under webpack://./ts.



Screenshot:



chrome devtools screenshot



Is there a way to get the source maps to display all files that where bundled not just the one in entry?



Code for each file.



file.ts



export function add(a: number, b: number) 
return a + b;



app.ts



import add from './file';

console.log(add(1, 3));


tsconfig.json




"compileOnSave": false,
"compilerOptions":
"outDir": "../wwwroot/js/dist/",
"sourceMap": true,
"noImplicitAny": true,

"target": "es5",
"module": "es6",

"allowJs": true,




webpack.config.json



const path = require('path');

module.exports =
// files to be built and what name to use as [name]: [file]
entry:
app: './ts/app.ts'
,
// use typescript source maps
devtool: 'source-map',
// handle typescript
module:
rules: [

test: /.ts/,
use: 'ts-loader',
exclude: /node_modules/

]
,

resolve:
extensions: [ '.ts', '.js' ]
,

output:
filename: '[name].js',
path: path.resolve(__dirname, '../wwwroot/js/dist/')











share|improve this question


























    0















    For a bit of background this is attempting to setup Typescript support in an existing (.NET) application.



    Here is the file structure:



    scripts
    | - ts
    | | - app.ts
    | | - file.ts
    | - .gitignore
    | - package.json
    | - tsconfig.json
    | - webpack.config.js


    When I build with webpack (see below) my source map only shows app.ts under webpack://./ts.



    Screenshot:



    chrome devtools screenshot



    Is there a way to get the source maps to display all files that where bundled not just the one in entry?



    Code for each file.



    file.ts



    export function add(a: number, b: number) 
    return a + b;



    app.ts



    import add from './file';

    console.log(add(1, 3));


    tsconfig.json




    "compileOnSave": false,
    "compilerOptions":
    "outDir": "../wwwroot/js/dist/",
    "sourceMap": true,
    "noImplicitAny": true,

    "target": "es5",
    "module": "es6",

    "allowJs": true,




    webpack.config.json



    const path = require('path');

    module.exports =
    // files to be built and what name to use as [name]: [file]
    entry:
    app: './ts/app.ts'
    ,
    // use typescript source maps
    devtool: 'source-map',
    // handle typescript
    module:
    rules: [

    test: /.ts/,
    use: 'ts-loader',
    exclude: /node_modules/

    ]
    ,

    resolve:
    extensions: [ '.ts', '.js' ]
    ,

    output:
    filename: '[name].js',
    path: path.resolve(__dirname, '../wwwroot/js/dist/')











    share|improve this question
























      0












      0








      0








      For a bit of background this is attempting to setup Typescript support in an existing (.NET) application.



      Here is the file structure:



      scripts
      | - ts
      | | - app.ts
      | | - file.ts
      | - .gitignore
      | - package.json
      | - tsconfig.json
      | - webpack.config.js


      When I build with webpack (see below) my source map only shows app.ts under webpack://./ts.



      Screenshot:



      chrome devtools screenshot



      Is there a way to get the source maps to display all files that where bundled not just the one in entry?



      Code for each file.



      file.ts



      export function add(a: number, b: number) 
      return a + b;



      app.ts



      import add from './file';

      console.log(add(1, 3));


      tsconfig.json




      "compileOnSave": false,
      "compilerOptions":
      "outDir": "../wwwroot/js/dist/",
      "sourceMap": true,
      "noImplicitAny": true,

      "target": "es5",
      "module": "es6",

      "allowJs": true,




      webpack.config.json



      const path = require('path');

      module.exports =
      // files to be built and what name to use as [name]: [file]
      entry:
      app: './ts/app.ts'
      ,
      // use typescript source maps
      devtool: 'source-map',
      // handle typescript
      module:
      rules: [

      test: /.ts/,
      use: 'ts-loader',
      exclude: /node_modules/

      ]
      ,

      resolve:
      extensions: [ '.ts', '.js' ]
      ,

      output:
      filename: '[name].js',
      path: path.resolve(__dirname, '../wwwroot/js/dist/')











      share|improve this question














      For a bit of background this is attempting to setup Typescript support in an existing (.NET) application.



      Here is the file structure:



      scripts
      | - ts
      | | - app.ts
      | | - file.ts
      | - .gitignore
      | - package.json
      | - tsconfig.json
      | - webpack.config.js


      When I build with webpack (see below) my source map only shows app.ts under webpack://./ts.



      Screenshot:



      chrome devtools screenshot



      Is there a way to get the source maps to display all files that where bundled not just the one in entry?



      Code for each file.



      file.ts



      export function add(a: number, b: number) 
      return a + b;



      app.ts



      import add from './file';

      console.log(add(1, 3));


      tsconfig.json




      "compileOnSave": false,
      "compilerOptions":
      "outDir": "../wwwroot/js/dist/",
      "sourceMap": true,
      "noImplicitAny": true,

      "target": "es5",
      "module": "es6",

      "allowJs": true,




      webpack.config.json



      const path = require('path');

      module.exports =
      // files to be built and what name to use as [name]: [file]
      entry:
      app: './ts/app.ts'
      ,
      // use typescript source maps
      devtool: 'source-map',
      // handle typescript
      module:
      rules: [

      test: /.ts/,
      use: 'ts-loader',
      exclude: /node_modules/

      ]
      ,

      resolve:
      extensions: [ '.ts', '.js' ]
      ,

      output:
      filename: '[name].js',
      path: path.resolve(__dirname, '../wwwroot/js/dist/')








      typescript webpack source-maps






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 7 at 16:58









      M HornbacherM Hornbacher

      1,19911827




      1,19911827






















          0






          active

          oldest

          votes












          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55049167%2fwebpack-source-map-only-showing-entry-files%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55049167%2fwebpack-source-map-only-showing-entry-files%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

          Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

          Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved