Skip to content

Commit

Permalink
build: Fixing Windows build error (jd-solanki#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbud committed Dec 6, 2022
1 parent ff68a04 commit eee1438
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 28 deletions.
3 changes: 0 additions & 3 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
ignore-workspace-root-check=true
shamefully-hoist=true
strict-peer-dependencies=false
auto-install-peers=true
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
"pnpm": "^7.17.1",
"rimraf": "^3.0.2",
"tsx": "^3.10.4",
"typescript": "^4.9.3",
"unbuild": "^1.0.1",
"vue-component-meta": "^1.0.8"
},
"packageManager": "pnpm@7.1.7"
"packageManager": "pnpm@7.18.0"
}
7 changes: 7 additions & 0 deletions packages/anu-nuxt/build.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineBuildConfig } from 'unbuild'

export default defineBuildConfig({
rollup: {
inlineDependencies: true,
},
})
6 changes: 4 additions & 2 deletions packages/anu-vue/tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"compilerOptions": {
"composite": true,
"module": "esnext",
"moduleResolution": "node"
"moduleResolution": "node",
},
"include": ["vite.config.ts"]
"include": [
"vite.config.ts"
]
}
13 changes: 8 additions & 5 deletions packages/anu-vue/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import vueJsx from '@vitejs/plugin-vue-jsx'
import { defineConfig } from 'vite'
import dts from 'vite-plugin-dts'

const externals = [
'vue',
'@floating-ui/dom',
]

// https://vitejs.dev/config/
export default defineConfig({
build: {
Expand All @@ -17,15 +22,13 @@ export default defineConfig({
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: [
'vue',
'@floating-ui/dom',
],
external: externals,
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: 'Vue',
'vue': 'Vue',
'@floating-ui/dom': 'FloatingDom',
},
},
},
Expand Down
1 change: 1 addition & 0 deletions packages/preset-theme-default/build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default defineBuildConfig({
},
externals: [
'@unocss/core',
'@unocss/reset',
'defu',
],
hooks: {
Expand Down
1 change: 1 addition & 0 deletions packages/preset-theme-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"devDependencies": {
"@types/fs-extra": "^9.0.13",
"@unocss/core": "^0.45.30",
"@unocss/reset": "^0.46.5",
"fs-extra": "^11.0.0"
}
}
5 changes: 4 additions & 1 deletion packages/preset-theme-default/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "."
"baseUrl": ".",
"types": [
"node"
]
},
"include": [
"src/**/*",
Expand Down
39 changes: 23 additions & 16 deletions pnpm-lock.yaml

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

0 comments on commit eee1438

Please sign in to comment.