Skip to content

Awesome project, Im just not being able to debug from typescript on vscode #19

@Ortega-Dan

Description

@Ortega-Dan

Sorry it is possibly lack of knowledge from my end ...

but I was able to port a chrome extension I had ... everything is working fine, but Im not able to debug from vscode ...

I know I need the sourcemaps for it so I change the tsconfig to

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es6",
        "noImplicitAny": false,
        "sourceMap": true, // <--------------- here the change
        "rootDir": "src",
        "outDir": "dist/js",
        "noEmitOnError": true,
        "typeRoots": [
            "node_modules/@types"
        ]
    }
}

but if I compile it like that (with tsc) it gives me the runtime error:
Uncaught ReferenceError: exports is not defined ...

I know that can be related to the module in the tsconfig.json ...
but if i change it from

    "module": "commonjs",

to

    "module": "umd",   // or "amd"

it then doesnt find a chain of dependencies ... starting from "moment" ...


and if (instead of all that) I do "npm run build" it doesnt create the sourceMaps in order to debug from typescript ...

I will appreciate so much your help ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions