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

Use realistic file paths in file scopes #647

Merged
merged 6 commits into from
May 2, 2022
Merged

Conversation

mattcompiles
Copy link
Contributor

This PR is the start of getting rid of package names in file scopes, with the intention of using more realistic file paths for the app being compiled. This hopefully solves (or helps to solve) a bunch of issues with file resolution and file chunk naming.

Fixes #462
Fixes #631

@changeset-bot
Copy link

changeset-bot bot commented Apr 5, 2022

🦋 Changeset detected

Latest commit: 340dc28

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@vanilla-extract/esbuild-plugin Patch
@vanilla-extract/webpack-plugin Patch
@vanilla-extract/vite-plugin Patch
@vanilla-extract/integration Major
@vanilla-extract/babel-plugin Patch
@vanilla-extract/rollup-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@graup
Copy link
Collaborator

graup commented Apr 5, 2022

Looks good to me and does solve the file path problem. We should verify that this doesn't regress the fix for #427.

@mattcompiles
Copy link
Contributor Author

@graup Thanks for reminding me about #427. I think it's possible this change could affect it. Thinking we should potentially make the filenames look absolute by prefixing with a /. That should hopefully stop any kind of automatic path processing from occurring as mentioned in the original issue. Will update this soon.

packages/vite-plugin/src/index.ts Outdated Show resolved Hide resolved
@mattcompiles mattcompiles mentioned this pull request May 1, 2022
@mattcompiles
Copy link
Contributor Author

@graup Looking to merge this soon. Happy with how it changes the rollup output? Seems cleaner to me but does make the custom asset file name test/docs a bit strange.

@graup
Copy link
Collaborator

graup commented May 1, 2022

@graup Looking to merge this soon. Happy with how it changes the rollup output? Seems cleaner to me but does make the custom asset file name test/docs a bit strange.

It does but I'm fine with that. That's optional anyway, no big deal if users don't get that. It works fine with the default setting too. To clarify, I wrote the rollup plugin and docs with this PR in mind.

Copy link
Contributor

@michaeltaranto michaeltaranto left a comment

Choose a reason for hiding this comment

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

LGTM

@mattcompiles mattcompiles merged commit 3c9b7d9 into master May 2, 2022
@mattcompiles mattcompiles deleted the filescope-paths branch May 2, 2022 03:56
@seek-oss-ci seek-oss-ci mentioned this pull request May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants