Skip to content

Commit

Permalink
Move to peer dependencies (#484)
Browse files Browse the repository at this point in the history
* Move to peer dependencies

Also add vite for building as we want to make stand-alone

* Make 0.0.3 prelease

* Bump postcss and postcss-preset-env to match core styles requirements

* Fix pretty issue

* Add vite-plugin-lib-inject-css

* Make uuid only as a dependeny allow any 8 or 9 version

---------

Co-authored-by: Wesley B <[email protected]>
  • Loading branch information
nathanfranklin and wesleyboar authored Oct 18, 2024
1 parent 4c72c37 commit c7a3ea0
Show file tree
Hide file tree
Showing 4 changed files with 5,609 additions and 3,586 deletions.
19 changes: 12 additions & 7 deletions libs/core-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tacc/core-components",
"version": "0.0.2",
"version": "0.0.3-beta.0",
"license": "MIT",
"author": "TACC ACI WMA <[email protected]>",
"contributors": [
Expand All @@ -13,17 +13,22 @@
"dist"
],
"homepage": "https://github.com/TACC/tup-ui/libs/core-components",
"scripts": {
"build": "vite build --outDir dist"
},
"dependencies": {
"uuid": "^8 || ^9"
},
"peerDependencies": {
"formik": "^2.2.9",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
"react-resize-detector": "^7.1.2",
"react-router-dom": "6.11.2",
"react-router-dom": "^6.11.2",
"react-step-wizard": "^5.3.11",
"react-table": "^7.8.0",
"reactstrap": "^9.1.5",
"uuid": "^8.3.2"
"reactstrap": "^9.1.5"
},
"devDependencies": {
"@nx/react": "^17.2.8",
Expand All @@ -33,7 +38,7 @@
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.5.2",
"@vitejs/plugin-react-swc": "^3.5.0",
"uuid": "^8.3.2",
"vite": "^5.0.11",
"vite-plugin-dts": "^2.3.0",
"vite-plugin-lib-inject-css": "^2.1.1",
"vite-tsconfig-paths": "^4.2.0"
Expand Down
15 changes: 14 additions & 1 deletion libs/core-components/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,21 @@ export default defineConfig({
],

build: {
sourcemap: true,
reportCompressedSize: true,
lib: {
entry: resolve(__dirname, 'src/index.ts'),
formats: ['es'],
},
rollupOptions: {
external: ['react', 'react/jsx-runtime'],
treeshake: true,
external: [
'react',
'react-dom',
'react-router-dom',
'react-router',
'react/jsx-runtime',
],
input: Object.fromEntries(
// https://rollupjs.org/configuration-options/#input
glob
Expand All @@ -48,6 +56,11 @@ export default defineConfig({
])
),
output: {
globals: {
react: 'React',
'react-dom': 'ReactDOM',
'react-router-dom': 'ReactRouterDOM',
},
assetFileNames: 'assets/[name][extname]',
entryFileNames: '[name].js',
},
Expand Down
Loading

0 comments on commit c7a3ea0

Please sign in to comment.