Skip to content

Commit

Permalink
fix/peerdep import (#23)
Browse files Browse the repository at this point in the history
* fix: upgrade pnpm version & add external pkg

* fix: peerdep import error
  • Loading branch information
devinxl authored Jan 15, 2024
1 parent 3d84dc5 commit 6d641a1
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 72 deletions.
5 changes: 5 additions & 0 deletions .changeset/dull-clouds-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@node-real/greenfield-uploadkit': patch
---

fix: peerdep import error
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ runs:
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 7
version: 8
run_install: false

- name: Setup pnpm config
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "greenfield-toolkit",
"version": "0.0.1",
"author": "node-real",
"packageManager": "pnpm@7.33.6",
"packageManager": "pnpm@8.9.2",
"description": "Greenfield Toolkit offers easy-to-use tools for developers to effortlessly start building on BNB Greenfield.",
"license": "MIT",
"scripts": {
Expand Down
15 changes: 9 additions & 6 deletions packages/uploadkit/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import { defineConfig } from 'vite';
// The default Vite plugin for React projects.
import react from '@vitejs/plugin-react';
// Write your styles in TypeScript (or JavaScript) with locally scoped class names and CSS Variables, then generate static CSS files at build time.
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
// A Vite plugin that generates declaration files (*.d.ts) from .ts(x) or .vue source files when using Vite in library mode.
import dts from 'vite-plugin-dts';
// A Rollup plugin which locates modules using the Node resolution algorithm, for using third party modules in node_modules
import nodeResolve from '@rollup/plugin-node-resolve';
// Automatically externalize peerDependencies in a rollup bundle.
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
import path from 'path';

Expand Down Expand Up @@ -35,7 +30,15 @@ export default defineConfig({
},
},
rollupOptions: {
external: ['react', 'react-dom', 'viem', 'wagmi', '@bnb-chain/greenfield-js-sdk'],
external: [
'react',
'react-dom',
'viem',
'wagmi',
'@bnb-chain/greenfield-cosmos-types',
'@bnb-chain/greenfield-js-sdk',
'@bnb-chain/reed-solomon',
],
plugins: [peerDepsExternal(), nodeResolve()],
output: {
chunkFileNames: 'common.js',
Expand Down
Loading

0 comments on commit 6d641a1

Please sign in to comment.