Closed Scrum closed 3 years ago
Thanks for your help. I reviewd my code. 'globby' should be 'dependencies' of vitjs/vit
package and root project, refer to https://github.com/vitjs/vit/blob/master/packages/vit/src/generateFiles/vit.ts#L6 and https://github.com/vitjs/vit/blob/master/scripts/copy.js#L2
As for 'react', It just used to generate template code and compatiable with @ant-design/icons
refer to https://github.com/vitjs/vit/blob/master/packages/vit/src/generateFiles/utils.ts#L6
I still not clear of your usage scenarios. And I used in https://github.com/theprimone/pinyin and https://github.com/theprimone/vite-react, it works very well.
Thanks for your help. I reviewd my code. 'globby' should be 'dependencies' of
vitjs/vit
package and root project, refer to https://github.com/vitjs/vit/blob/master/packages/vit/src/generateFiles/vit.ts#L6 and https://github.com/vitjs/vit/blob/master/scripts/copy.js#L2As for 'react', It just used to generate template code and compatiable with
@ant-design/icons
refer to https://github.com/vitjs/vit/blob/master/packages/vit/src/generateFiles/utils.ts#L6I still not clear of your usage scenarios. And I used in https://github.com/theprimone/pinyin and https://github.com/theprimone/vite-react, it works very well.
repository where reproduced
@Scrum I have fixed this error. You should add react
to dependencies
in your repo, this is a react project after all. globby
dep has fixed by @vitjs/vit@0.6.1
https://github.com/vitjs/vit/commit/b4751013bd2e7862c265a54a4b549f5c5bfce332
Thanks for your feedback.
You should add
react
todependencies
in your repo, this is a react project after all
peerDependencies
gives a clear understanding of what packages are needed to work you don't have to include them as a dependency
Errors occur when starting according to the documentation Error: Cannot find module 'react' Error: Cannot find module 'globby'