builder-vite icon indicating copy to clipboard operation
builder-vite copied to clipboard

Vite can't parse "storybook-react-i18next" dependence on "storybook-i18n"

Open Cyberhan123 opened this issue 3 years ago • 3 comments

截屏2022-02-10 下午11 32 03

And In preview.js

module.exports = require("./dist/cjs/preset/preview");

So It throw an error ReferenceError: require is not defined

And This code at const getProjectAnnotations = async () =>

How should I do

Cyberhan123 avatar Feb 10 '22 15:02 Cyberhan123

Yes, I think this bug needs to be fixed in these libraries. They're not 100 % ESM-compatible, it appears. One could possibly do some trickery with optimizeDeps, I'm not sure...

eirslett avatar Feb 10 '22 21:02 eirslett

Yes, I think this bug needs to be fixed in these libraries. They're not 100 % ESM-compatible, it appears. One could possibly do some trickery with optimizeDeps, I'm not sure...

Yeah, I have no idea about optimizeDeps with ESM-compatible,can you give me some example...

Cyberhan123 avatar Feb 11 '22 01:02 Cyberhan123

Did anyone find a solution or workaround?

jrmyio avatar Oct 12 '22 22:10 jrmyio