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(main): still load tsconfig-paths-webpack-plugin when baseUrl misses from tsconfig #819

Merged

Conversation

sverweij
Copy link
Owner

@sverweij sverweij commented Jul 2, 2023

Description

  1. still load the tsconfig-paths-webpack-plugin when the baseUrl isn't defined and pass it ./ for baseUrl as a default path in those cases
  2. when the baseUrl is defined pass undefined as baseUrl to tsconfig-paths-webpack-plugin, so the plugin will read the baseUrl from

Motivation and Context

Provides a workaround for dividab/tsconfig-paths-webpack-plugin#99; fixes #818

When dividab/tsconfig-paths-webpack-plugin#105 lands the second part of this PR should be reverted to keep the code as simple as possible

How Has This Been Tested?

  • green ci
  • additional & adapted automated tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation only change
  • Refactor (non-breaking change which fixes an issue without changing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • 📖

    • My change doesn't require a documentation update, or ...
    • it does and I have updated it
  • ⚖️

    • The contribution will be subject to The MIT license, and I'm OK with that.
    • The contribution is my own original work.
    • I am ok with the stuff in CONTRIBUTING.md.

@sverweij sverweij changed the title fix(main): when baseUrl is tsconfig still load tsconfig-paths-webpack-plugin fix(main): when baseUrl misses from tsconfig, still load tsconfig-paths-webpack-plugin Jul 2, 2023
@sverweij sverweij changed the title fix(main): when baseUrl misses from tsconfig, still load tsconfig-paths-webpack-plugin fix(main): still load tsconfig-paths-webpack-plugin when baseUrl misses from tsconfig Jul 2, 2023
@sverweij sverweij merged commit ddd81a0 into main Jul 2, 2023
6 checks passed
@sverweij sverweij deleted the bugfix/work-around-tsconfig-paths-webpack-plugin-base-url-bug branch July 2, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue: not resolving paths on tsconfig for next.js projects
1 participant