Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sourcemaps support with TS #7818

Merged
merged 4 commits into from
Jun 14, 2022
Merged

Fix sourcemaps support with TS #7818

merged 4 commits into from
Jun 14, 2022

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented Jun 13, 2022

Fixes #7811, #7580

Reverts #6993

@slax57 slax57 added the RFR Ready For Review label Jun 13, 2022
@fzaninotto
Copy link
Member

fzaninotto commented Jun 13, 2022

When comparing with the PR this is reverting (#6993), I see many small differences. Are they on purpose?

@djhi
Copy link
Collaborator Author

djhi commented Jun 13, 2022

When comparing with the PR this is reverting (#6993), I see many small differences. Are they on purpose?

Can you ellaborate ?

@fzaninotto
Copy link
Member

in 3.0:

    "main": "lib/index",
    "module": "esm/index.js",
    "types": "esm/index.d.ts",

your PR:

    "main": "dist/cjs/index.js",
    "module": "dist/esm/index.js",
    "types": "dist/cjs/index.d.ts",

in 3.0:

        "build": "yarn run build-cjs && yarn run build-esm",
        "build-cjs": "rimraf ./lib && tsc",
        "build-esm": "rimraf ./esm && tsc --outDir esm --module es2015",
        "watch": "tsc --outDir esm --module es2015 --watch"

Your PR:

        "build": "yarn run build-cjs && yarn run build-esm",
        "build-cjs": "rimraf ./dist/cjs && tsc --outDir dist/cjs",
        "build-esm": "rimraf ./dist/esm && tsc --outDir dist/esm --module es2015",
        "watch": "tsc --outDir dist/esm --module es2015 --watch"

My question is: why these differences? Since the 3.0 setup was known to work, why didn't you use it as is?

@djhi
Copy link
Collaborator Author

djhi commented Jun 13, 2022

Just to have a single output directory (./dist)

@fzaninotto fzaninotto merged commit 7296d9e into master Jun 14, 2022
@fzaninotto fzaninotto deleted the fix-source-maps branch June 14, 2022 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Go to definition doesn't work in VSCode
3 participants