We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
有的时候我们还需要以 组件库 形式开发, 不单单是以 页面 为最终产物
计划未来我们的 blocklet 模板, 会统一成 vite 框架, 我们应该在 vite-plugin-blocklet, 来直接支撑这个功能
目前 @nft-store/react 已经成功配置对应的功能, 需要后续变成组件
// vite.config.js import { buildPlugin } from 'vite-plugin-build'; // config plugins: [ react(), buildPlugin({ // multiple files build fileBuild: { emitDeclaration: true, esOutputDir: './dist/es', commonJsOutputDir: './dist/cjs', }, // single file build // libBuild: { // buildOptions: { // rollupOptions: { // external: ['react', 'react-dom'], // output: { // globals: { // react: 'React', // 'react-dom': 'react-dom', // }, // }, // }, // lib: { // entry: resolvePath('src/index.jsx'), // name: 'nft-store-react-components', // formats: ['es', 'umd'], // fileName: format => `nft-store-react-components.${format}.js`, // }, // }, // }, }), ],
// package.json "type": "module", "main": "./dist/cjs", "module": "./dist/es", "typings": "./dist/index.d.ts", "exports": { ".": { "import": "./dist/es", "require": "./dist/cjs" }, "./components/": { "import": "./dist/es/components/", "require": "./dist/cjs/components/" } },
https://cn.vitejs.dev/config/build-options.html#build-lib https://github.com/samonxian/vite-plugin-build/blob/master/README.zh-CN.md
The text was updated successfully, but these errors were encountered:
FireTable
No branches or pull requests
有的时候我们还需要以 组件库 形式开发, 不单单是以 页面 为最终产物
计划未来我们的 blocklet 模板, 会统一成 vite 框架, 我们应该在 vite-plugin-blocklet, 来直接支撑这个功能
目前 @nft-store/react 已经成功配置对应的功能, 需要后续变成组件
参考资料
https://cn.vitejs.dev/config/build-options.html#build-lib
https://github.com/samonxian/vite-plugin-build/blob/master/README.zh-CN.md
The text was updated successfully, but these errors were encountered: