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

feat!: move to file-services/resolve as default resolver #2907

Merged
merged 8 commits into from
Oct 1, 2023

Conversation

barak007
Copy link
Collaborator

@barak007 barak007 commented Sep 26, 2023

This PR replaces enhanced-resolve default resolver with @file-services/resolve which is much faster and easier to use.

Notes:

  • This is a breaking change
  • The old resolver created by createDefaultResolver is now available from the @stylable/webpack-plugin package and also used by default in it
  • Need to migration guide:
    • minimal explanation on the difference between the options of the old and new resolver with an emphasis on alias.
    • removal of resolveOptions

Copy link
Collaborator

@idoros idoros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks promising, but I've noticed a few issues that I've commented on. Additionally, there's one more thing that I think should be tested:

The Webpack-Plugin currently conducts tests solely with its own resolver. Could you please include a test to ensure that the new default resolver can be integrated and functions correctly? I believe it's essential to guide users in this direction, especially if they have a setup involving multiple integrations and need the resolver to operate consistently across all of them.

Let's review it one more time to ensure that we haven't overlooked anything.

packages/core/src/module-resolver.ts Outdated Show resolved Hide resolved
packages/core/src/module-resolver.ts Outdated Show resolved Hide resolved
packages/core/src/module-resolver.ts Outdated Show resolved Hide resolved
packages/core/src/stylable.ts Outdated Show resolved Hide resolved
packages/core/test/features/st-import.spec.ts Outdated Show resolved Hide resolved
packages/webpack-plugin/src/legacy-module-resolver.ts Outdated Show resolved Hide resolved
packages/webpack-plugin/src/legacy-module-resolver.ts Outdated Show resolved Hide resolved
packages/webpack-plugin/src/legacy-module-resolver.ts Outdated Show resolved Hide resolved
packages/webpack-plugin/src/plugin.ts Outdated Show resolved Hide resolved
packages/cli/test/cli.spec.ts Show resolved Hide resolved
@idoros idoros added core Processing and transforming logic next-major Issues or PR related to the next major version labels Sep 27, 2023
@idoros idoros self-assigned this Sep 27, 2023
@barak007 barak007 requested a review from idoros October 1, 2023 08:34
@barak007 barak007 merged commit e668634 into master Oct 1, 2023
12 checks passed
@barak007 barak007 deleted the barak/fs-resolver branch October 1, 2023 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Processing and transforming logic next-major Issues or PR related to the next major version
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

2 participants