Skip to content

Commit

Permalink
feat(): Update vite.config.ts to copy package.json into dist
Browse files Browse the repository at this point in the history
  • Loading branch information
edezekiel committed May 3, 2024
1 parent 563dd8f commit 28d3115
Show file tree
Hide file tree
Showing 3 changed files with 630 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libs/shared/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
import * as path from 'path';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
import copy from 'rollup-plugin-copy';

export default defineConfig({
root: __dirname,
Expand Down Expand Up @@ -43,6 +44,14 @@ export default defineConfig({
rollupOptions: {
// External packages that should not be bundled into your library.
external: ['react', 'react-dom', 'react/jsx-runtime'],
plugins: [
copy({
targets: [
{ src: 'package.json', dest: '../../dist/libs/shared' }
],
hook: 'writeBundle'
})
]
},
},

Expand Down

0 comments on commit 28d3115

Please sign in to comment.