Skip to content

Commit

Permalink
Merge pull request #20 from thisyahlen-deriv/thisyahlen/package-json-…
Browse files Browse the repository at this point in the history
…main

chore: add main path
  • Loading branch information
thisyahlen-deriv authored Sep 11, 2024
2 parents 4151125 + eaa3400 commit 5d185e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": false,
"version": "0.0.0-development",
"type": "module",
"main": "dist/main.js",
"main": "dist/index.js",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
Expand Down
14 changes: 11 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default defineConfig({
react(),
dts({
include: ['src'],
exclude: ['src/**/*.spec.tsx'],
exclude: ['src/**/*.spec.tsx', 'src/App.tsx', 'src/main.tsx'],
tsconfigPath: './tsconfig.app.json',
insertTypesEntry: true,
}),
Expand All @@ -25,11 +25,19 @@ export default defineConfig({
},
copyPublicDir: false,
rollupOptions: {
external: ['react', 'react/jsx-runtime', 'react-dom'],
external: ['react', 'react/jsx-runtime', 'react-dom', '@deriv-com/api-hooks', '@deriv-com/utils'],
input: Object.fromEntries(
glob
.sync('src/**/*.{ts,tsx}', {
ignore: ['**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts', '**/*.spec.tsx', '**/__tests__/**'],
ignore: [
'**/*.test.ts',
'**/*.test.tsx',
'**/*.spec.ts',
'**/*.spec.tsx',
'**/__tests__/**',
'./src/App.tsx',
'./src/main.tsx',
],
})
.map(file => {
return [
Expand Down

0 comments on commit 5d185e5

Please sign in to comment.