Skip to content

Commit

Permalink
feat: merge pull request #173 from nyaggah/develop
Browse files Browse the repository at this point in the history
fix: global var for crx (troubleshoot)
  • Loading branch information
JoeyDoey authored Aug 12, 2023
2 parents d5e3363 + a91d1da commit 64ab665
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 88 deletions.
6 changes: 6 additions & 0 deletions .changeset/sharp-birds-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@bedframe/core': patch
'@bedframe/cli': patch
---

global var for crx (troubleshoot)
2 changes: 1 addition & 1 deletion packages/cli/src/lib/write-package-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export function createDependenciesFrom(response: prompts.Answers<string>): {
},
{
devDependencies: [
{ name: '@bedframe/core', version: '^0.0.28' },
{ name: '@bedframe/core', version: '^0.0.29' },
{ name: '@types/chrome', version: '^0.0.243' },
{ name: '@types/react', version: '^18.2.9' },
{ name: '@types/react-dom', version: '^18.2.7' },
Expand Down
5 changes: 4 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@
"lint:format": "pnpm prettier:write && pnpm lint",
"rebuild:pack": "rm -rf node_modules pnpm-lock.yaml && pnpm i && pnpm build && pnpm pack"
},
"dependencies": {
"@crxjs/vite-plugin": "^1.0.14"
},
"devDependencies": {
"@crxjs/vite-plugin": "^1.0.14",
"@types/chrome": "^0.0.243",
"@types/node": "^20.4.10",
"@typescript-eslint/eslint-plugin": "^6.3.0",
Expand All @@ -52,6 +54,7 @@
"vite": "^4.4.9",
"vite-plugin-babel-macros": "^1.0.6",
"vite-plugin-dts": "^3.5.1",
"vite-plugin-externalize-deps": "^0.7.0",
"vitest": "^0.34.1"
},
"lint-staged": {
Expand Down
18 changes: 14 additions & 4 deletions packages/core/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { resolve } from 'node:path'
import { defineConfig } from 'vite'
import dts from 'vite-plugin-dts'
import { nodeExternals } from './node-externals'
import { externalizeDeps } from 'vite-plugin-externalize-deps'

export default defineConfig({
build: {
Expand All @@ -14,16 +15,25 @@ export default defineConfig({
outDir: 'dist',
emptyOutDir: true,
rollupOptions: {
external: ['@crxjs/vite-plugin'],
// external: ['@crxjs/vite-plugin'],
output: {
globals: {
'@crxjs/vite-plugin': '@crxjs/vite-plugin',
},
},
},
},
plugins: [
externalizeDeps({
deps: false,
// except: ['@crxjs/vite-plugin'],
}),
nodeExternals(),
dts({
insertTypesEntry: true,
}),
],
// optimizeDeps: {
// include: ['@crxjs/vite-plugin'],
// },
optimizeDeps: {
include: ['@crxjs/vite-plugin'],
},
})
Loading

0 comments on commit 64ab665

Please sign in to comment.