Skip to content

Commit

Permalink
fix: tweak build settings to stop bundling classnames
Browse files Browse the repository at this point in the history
  • Loading branch information
davidicus committed Jan 20, 2024
1 parent 2a23eca commit c26106c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
13 changes: 6 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@phillips/seldon",
"version": "1.9.0",
"type": "module",
"main": "./dist/index.cjs",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
Expand Down Expand Up @@ -33,6 +33,7 @@
"prepare": "husky install"
},
"dependencies": {
"classnames": "^2.5.1",
"flatpickr": "^4.6.13",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand All @@ -59,7 +60,6 @@
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"@vitejs/plugin-react": "^4.0.0",
"classnames": "^2.3.2",
"color": "^4.2.3",
"eslint": "^8.38.0",
"eslint-plugin-react-hooks": "^4.6.0",
Expand Down
19 changes: 9 additions & 10 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export default defineConfig({
// Could also be a dictionary or array of multiple entry points
entry: ['index.ts'],
name: 'seldon',
formats: ['es', 'cjs'],
},

rollupOptions: {
Expand All @@ -68,17 +67,17 @@ export default defineConfig({
chunkFileNames: '[name].js',
entryFileNames: '[name].js',
},
{
dir: 'dist',
format: 'cjs',
preserveModulesRoot: 'src',
chunkFileNames: '[name].cjs',
entryFileNames: '[name].cjs',
},
],
// {
// dir: 'dist',
// format: 'cjs',
// preserveModulesRoot: 'src',
// chunkFileNames: '[name].cjs',
// entryFileNames: '[name].cjs',
// },
],
// make sure to externalize deps that shouldn't be bundled
// into your library
external: [...Object.keys(packageJson.peerDependencies)],
external: [...Object.keys(packageJson.peerDependencies), ...Object.keys(packageJson.dependencies)],
plugins: [
copy({
hook: 'writeBundle',
Expand Down

0 comments on commit c26106c

Please sign in to comment.