Using fluentui in vitest after ESM-first change #36614
Replies: 1 comment 1 reply
|
You're not doing anything wrong. The gap is in That's the entirety of tabster@8.8.0's entry point config: {
"type": "module",
"main": "./dist/cjs/index.cjs",
"module": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts"
}No And the CJS build is one that function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: Object.getOwnPropertyDescriptor(all, name).get
});
}
_export(exports, {
get createTabster () { return _Tabster.createTabster; },
...The lexer only recognises a fixed set of static shapes. It can't follow a You can reproduce it with no vitest anywhere, just tabster 8.8.0 on Node 24: Which explains the timing. Before that commit, So your inline isn't a hack, it's the correct lever. It hands the resolution back to Vite, and Vite does honour You can narrow it. In your stack the tabster imports come from The real fix is an |
Uh oh!
There was an error while loading. Please reload this page.
I'm using fluentui in vitest and after 035ee66 (ship web packages ESM-first (type:module), drop node export condition) I'm getting errors like error:
I can solve it by inlining in
vitest.config.js:but I'm guessing that should not be required? Appreciate any hints on what I'm doing wrong or if it's a bug.
All reactions