-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
test: migrate playgrounds to ESM #13094
Conversation
|
@poyoho Could take a look at https://github.com/vitejs/vite/pull/13094/files#diff-1ce4192bd1beda65d5cd5385762abd35e0b9c82cce09f4198d8d259df423a6c4 in case I missed some test intention in #6597. |
The test will test the large json file in ssr bundle with esm would not to out of max timeline. |
@poyoho So I guess we do not need to test the metrics result of the line under vite/playground/json/index.ssr.html Lines 15 to 21 in 54c023b
|
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.
Thanks for migrating these once again! Left some comments below, mostly nitpicks.
playground/css/__tests__/postcss-plugins-different-dir/postcss-plugins-different-dir.spec.ts
Outdated
Show resolved
Hide resolved
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.
Looks great! 🔥
Description
A successor of #8252 and #12131. This PR mainly contains the following changes.
"type": "module
for most packages in/playground
except the ones for testing in CJS, they're:playground/cli/package.json
playground/css-codesplit-cjs/package.json
:playground/define/commonjs-dep/package.json
playground/resolve/exports-and-nested-scope/package.json
playground/resolve/exports-with-module/package.json
playground/resolve-config/package.json
playground/ssr-noexternal/require-external-cjs/package.json
.mjs
->.js
due totype: module
toggling the dist artifacts ext.playground/hmr/tsconfig.json
which is no longer useful.playground/json/server.js
) from fix(ssr): avoid transforming json file in ssrTransform #6597. The file is not invoked because that PR merged after/packages/playground/json
moves to/playground/json
and becomes ineffective in rebasing. The weird thing is that I didn't see added new test case in fix(ssr): avoid transforming json file in ssrTransform #6597(Did I miss something 🤔?). So I tried to add some basic test cases for it. And I leave some// TODO: what is this for?
on some lines I don't understand clearly.import/no-commonjs
forplayground
with some excluded CJS fixtures to keep using ESM afterward.Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).