Skip to content

Commit

Permalink
fix(vite): update alpha to new config
Browse files Browse the repository at this point in the history
  • Loading branch information
Notredame Wim EXT authored and Notredame Wim EXT committed Jan 17, 2025
1 parent ef82479 commit fe169b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion packages/alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
"license": "Apache-2.0",
"repository": "cognitedata/cognite-sdk-js",
"homepage": "https://github.com/cognitedata/cognite-sdk-js#readme",
"main": "dist/index.js",
"main": "dist/index.cjs",
"module": "dist/index.js",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"types": "dist/src/index.d.ts",
"version": "1.0.0-rc.4",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions packages/alpha/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ export default defineConfig({
sourcemap: true,
target: 'es6',
lib: {
formats: ['es'],
formats: ['es','cjs'],
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, 'src/index.ts'),
name: 'index',
// the proper extensions will be added
fileName: 'index',
fileName: (format) => (format === 'es' ? 'index.js' : 'index.cjs'), // Output files for different formats
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
Expand Down

0 comments on commit fe169b9

Please sign in to comment.