-
Notifications
You must be signed in to change notification settings - Fork 143
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
Simplify Vite Plugin #2183
Simplify Vite Plugin #2183
Conversation
assets(), | ||
contentFor(), | ||
|
||
babel({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I liked your earlier suggestion of having babel present in the userland vite config.
folks may want to change this and it isn't "our" plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
babel would be configured with the babel config file, not in the vite config.
See react and vue vite plugins, they also setup babel but it's ultimately configured by the user with a babel config file.
https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/src/index.ts
https://github.com/vitejs/vite-plugin-vue/blob/599f81369816aca918314e86f5b0a6e32367bb38/packages/plugin-vue-jsx/src/index.ts#L4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess if we're confident in our defaults, and want to align with everyone else, I'm game.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave this one open to see if anyone else has an opinion. I would vote for keeping this internal though, as users should only need to worry about babel.config.js
, not how it actually is run on the files.
server: { | ||
port: 4200, | ||
}, | ||
build: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think build, and the choice to configure tests
should be left to the user.
right now there some unease around /tests/
and the escape hatch we have in the existing vite config is to encourage changing /tests/
to /tests__whatever_i_want/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #2183 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for this one, specifically, I think it's better to expose always, for discoverability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if you could just do and we have this in the userland vite config?
ember({
testUrl: 'tests/'
})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why invent and maintain a new API tho?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(i'll defer to others on this if they disagree with me, ofc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually maybe I need to understand this unease and escape hatch a litte more.
How would the user configure this, they would also need to rename the tests folder wouldn't they?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excited for shrinking the "default" config, but i left some comments/questions/concerns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ope
Anyone have an idea why the CI bails out saying the lockfile needs to be updated? (I've ran pnpm and lockfile is not changing between runs) |
does your tooling change your pnpm version based on the |
I'm using volta with the pnpm flag enabled, so I think it should be, but it's installing 9 instead of 8, so I guess it's not. |
yeah, we don't have a volta config in the package.jsons |
Ah ok, this would suggest otherwise |
Downgraded to pnpm 8.15.8 using corepack and now getting a strange typescript issue when running pnpm install, showing in CI as well.
but it's not used before being assigned embroider/packages/macros/tests/babel/helpers.ts Lines 82 to 85 in 0aa8fc6
Changing it to a const |
Looks like typescript updated. Should that be pinned instead since stuff breaks often with typescript minor updates? I don't understand why |
This will allow the vite config to just be