Skip to content

Commit

Permalink
build: externals dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 committed Sep 17, 2022
1 parent 8f4d974 commit 3614661
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 195 deletions.
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
"@mui/lab": "^5.0.0-alpha.99",
"@mui/material": "^5.10.5",
"copy-to-clipboard": "^3.3.2",
"events": "^3.3.0",
"flux": "^4.0.3",
"react-base16-styling": "^0.9.1",
"uuid": "^9.0.0",
"zustand": "^4.1.1"
},
"lint-staged": {
Expand Down
8 changes: 5 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { resolve } from 'path'
import dts from 'vite-plugin-dts'
import { defineConfig } from 'vitest/config'

import { peerDependencies } from './package.json'
import { dependencies, peerDependencies } from './package.json'

const externals = Object.assign(peerDependencies, dependencies)

// https://vitejs.dev/config/
export default defineConfig({
Expand All @@ -16,9 +18,9 @@ export default defineConfig({
fileName: 'index'
},
rollupOptions: {
external: Object.keys(peerDependencies),
external: Object.keys(externals),
output: {
globals: Object.keys(peerDependencies).reduce(
globals: Object.keys(externals).reduce(
(result, value) => Object.assign(result, { [value]: value }),
{}
)
Expand Down
Loading

0 comments on commit 3614661

Please sign in to comment.