Coder Social home page Coder Social logo

Comments (4)

jbrantly avatar jbrantly commented on May 20, 2024 1

Make sure you've set sourceMap to true in your tsconfig.json file. If that still doesn't work I'll see if I can duplicate.

On a side note, just before you posted this I reached out to you on twitter. Wondering about your thoughts on feature parity between this and other TS loaders.

from ts-loader.

jbrantly avatar jbrantly commented on May 20, 2024

I did test this and it works fine as long as you have specified a tsconfig.json file and turned sourcemaps on. By default they are off so TypeScript never generates a sourcemap to hand off to webpack.

I'm going to close since I don't believe there is an issue but if you still have problems feel free to reopen.

from ts-loader.

flyon avatar flyon commented on May 20, 2024

hey, sorry for the late reply. I had never heard of tsconfig.json yet, it works now. tnx!

from ts-loader.

perkinss avatar perkinss commented on May 20, 2024

Will this also work if the ts configuration is inside the webpack configuration instead of a tsconfig.json?

 ...
 module: {
      loaders: [
           // all files with a `.ts` or `.tsx` extension will be handled by `ts-loader`
          { test: /\.tsx?$/, loader: 'ts-loader' }
          ]
    },
    ts: {
        // configures the ts compiler:
        "compilerOptions": {
            "target": "es5",
            "sourceMap": true,
            "jsx": "react",
            "experimentalDecorators": true
         },
         "exclude": [
             "node_modules" // add other exclusions for the ts compiler.
            ]
         },...

from ts-loader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.