diff --git a/CHANGELOG.md b/CHANGELOG.md index e31a42e9..9f8ffd9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.1 (2024-8-13) + +- chore(vite-plugin-blocklet): skip embed plugin while embeds is empty + ## 0.9.0 (2024-8-12) - feat(vite-plugin-blocklet): add embed build plugin diff --git a/package.json b/package.json index d5d0f7f5..2791ff1b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "create-blocklet", "private": true, - "version": "0.9.0", + "version": "0.9.1", "description": "", "keywords": [], "author": "", diff --git a/packages/create-app/package.json b/packages/create-app/package.json index f4afa5af..b517a083 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,6 +1,6 @@ { "name": "create-blocklet", - "version": "0.9.0", + "version": "0.9.1", "exports": "./index.js", "type": "module", "repository": "git@github.com:blocklet/create-blocklet.git", diff --git a/packages/create-app/templates/react-dapp-ts/package.json b/packages/create-app/templates/react-dapp-ts/package.json index d1a72677..dab33588 100644 --- a/packages/create-app/templates/react-dapp-ts/package.json +++ b/packages/create-app/templates/react-dapp-ts/package.json @@ -80,7 +80,7 @@ "ts-node": "^10.9.2", "typescript": "^5.5.2", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.9.0", + "vite-plugin-blocklet": "^0.9.1", "vite-plugin-svgr": "^4.2.0", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/react-dapp/package.json b/packages/create-app/templates/react-dapp/package.json index 584985b4..677b923e 100644 --- a/packages/create-app/templates/react-dapp/package.json +++ b/packages/create-app/templates/react-dapp/package.json @@ -70,7 +70,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.9.0", + "vite-plugin-blocklet": "^0.9.1", "vite-plugin-svgr": "^4.2.0", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/react-gun-dapp/package.json b/packages/create-app/templates/react-gun-dapp/package.json index 98879bc4..e9955600 100644 --- a/packages/create-app/templates/react-gun-dapp/package.json +++ b/packages/create-app/templates/react-gun-dapp/package.json @@ -70,7 +70,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.9.0", + "vite-plugin-blocklet": "^0.9.1", "vite-plugin-svgr": "^4.2.0", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/react-static/package.json b/packages/create-app/templates/react-static/package.json index f1beb0e7..5e2bfc8a 100644 --- a/packages/create-app/templates/react-static/package.json +++ b/packages/create-app/templates/react-static/package.json @@ -51,7 +51,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.9.0", + "vite-plugin-blocklet": "^0.9.1", "vite-plugin-svgr": "^4.2.0", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/solidjs-dapp/package.json b/packages/create-app/templates/solidjs-dapp/package.json index fe0b0a5a..bac2216a 100644 --- a/packages/create-app/templates/solidjs-dapp/package.json +++ b/packages/create-app/templates/solidjs-dapp/package.json @@ -35,7 +35,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.9.0", + "vite-plugin-blocklet": "^0.9.1", "vite-plugin-solid": "^2.10.2", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/solidjs-static/package.json b/packages/create-app/templates/solidjs-static/package.json index 87a47d10..652a18c6 100644 --- a/packages/create-app/templates/solidjs-static/package.json +++ b/packages/create-app/templates/solidjs-static/package.json @@ -31,7 +31,7 @@ "simple-git-hooks": "^2.11.1", "solid-js": "^1.8.18", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.9.0", + "vite-plugin-blocklet": "^0.9.1", "vite-plugin-solid": "^2.10.2", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/svelte-dapp/package.json b/packages/create-app/templates/svelte-dapp/package.json index 41a862da..653d88dc 100644 --- a/packages/create-app/templates/svelte-dapp/package.json +++ b/packages/create-app/templates/svelte-dapp/package.json @@ -43,7 +43,7 @@ "simple-git-hooks": "^2.11.1", "svelte": "^4.2.18", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.9.0", + "vite-plugin-blocklet": "^0.9.1", "zx": "^8.1.4" }, "lint-staged": { diff --git a/packages/create-app/templates/svelte-static/package.json b/packages/create-app/templates/svelte-static/package.json index b8de976b..8fe42d59 100644 --- a/packages/create-app/templates/svelte-static/package.json +++ b/packages/create-app/templates/svelte-static/package.json @@ -24,7 +24,7 @@ "simple-git-hooks": "^2.11.1", "svelte": "^4.2.18", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.9.0", + "vite-plugin-blocklet": "^0.9.1", "zx": "^8.1.4" }, "lint-staged": { diff --git a/packages/create-app/templates/todo-list-example/package.json b/packages/create-app/templates/todo-list-example/package.json index 7fbb59a2..9c336f54 100644 --- a/packages/create-app/templates/todo-list-example/package.json +++ b/packages/create-app/templates/todo-list-example/package.json @@ -95,7 +95,7 @@ "ts-node": "^10.9.2", "typescript": "^5.5.2", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.9.0", + "vite-plugin-blocklet": "^0.9.1", "vite-plugin-svgr": "^4.2.0", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/vue-dapp/package.json b/packages/create-app/templates/vue-dapp/package.json index a052aa78..1b28c20e 100644 --- a/packages/create-app/templates/vue-dapp/package.json +++ b/packages/create-app/templates/vue-dapp/package.json @@ -48,7 +48,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.9.0", + "vite-plugin-blocklet": "^0.9.1", "vue": "^3.4.31", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/vue-static/package.json b/packages/create-app/templates/vue-static/package.json index 39e47b79..60e0060b 100644 --- a/packages/create-app/templates/vue-static/package.json +++ b/packages/create-app/templates/vue-static/package.json @@ -29,7 +29,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.9.0", + "vite-plugin-blocklet": "^0.9.1", "vue": "^3.4.31", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/vue-ts-static/package.json b/packages/create-app/templates/vue-ts-static/package.json index 1a3a1d29..a078c762 100644 --- a/packages/create-app/templates/vue-ts-static/package.json +++ b/packages/create-app/templates/vue-ts-static/package.json @@ -39,7 +39,7 @@ "taze": "^0.16.3", "typescript": "^5.5.4", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.9.0", + "vite-plugin-blocklet": "^0.9.1", "vue-tsc": "^2.0.29", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/vue2-dapp/package.json b/packages/create-app/templates/vue2-dapp/package.json index 42c0daed..99a01189 100644 --- a/packages/create-app/templates/vue2-dapp/package.json +++ b/packages/create-app/templates/vue2-dapp/package.json @@ -47,7 +47,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.9.0", + "vite-plugin-blocklet": "^0.9.1", "vue": "^2.7.16", "zx": "^8.1.4" }, diff --git a/packages/create-app/templates/vue2-static/package.json b/packages/create-app/templates/vue2-static/package.json index 7237356e..7ace6bda 100644 --- a/packages/create-app/templates/vue2-static/package.json +++ b/packages/create-app/templates/vue2-static/package.json @@ -29,7 +29,7 @@ "rimraf": "^5.0.7", "simple-git-hooks": "^2.11.1", "vite": "^5.3.5", - "vite-plugin-blocklet": "^0.9.0", + "vite-plugin-blocklet": "^0.9.1", "vue": "^2.7.16", "zx": "^8.1.4" }, diff --git a/plugins/vite-plugin-blocklet/libs/embed.js b/plugins/vite-plugin-blocklet/libs/embed.js index 65fe158e..5518d1f5 100644 --- a/plugins/vite-plugin-blocklet/libs/embed.js +++ b/plugins/vite-plugin-blocklet/libs/embed.js @@ -41,6 +41,10 @@ export default function createEmbedPlugin(options) { }); } + if (inputEmbeds.length === 0) { + return []; + } + return [ { name: 'blocklet:embed:serve', @@ -53,7 +57,6 @@ export default function createEmbedPlugin(options) { } const entryId = parseURL(id).pathname; const embedInput = embedList.find((x) => joinURL(withLeadingSlash(x.output), ENTRY_FILE) === entryId); - console.log('embedInput', embedInput); if (embedInput?.entry) { const resolution = await this.resolve(embedInput.entry, importer, options); return withQuery(resolution.id, { [PROXY_SUFFIX]: '' }); diff --git a/plugins/vite-plugin-blocklet/package.json b/plugins/vite-plugin-blocklet/package.json index faa204dd..21c9cbc1 100644 --- a/plugins/vite-plugin-blocklet/package.json +++ b/plugins/vite-plugin-blocklet/package.json @@ -1,7 +1,7 @@ { "name": "vite-plugin-blocklet", "type": "module", - "version": "0.9.0", + "version": "0.9.1", "description": "", "main": "index.js", "files": [ diff --git a/plugins/vite-plugin-wss-hmr/package.json b/plugins/vite-plugin-wss-hmr/package.json index 8d9c1108..82818b0a 100644 --- a/plugins/vite-plugin-wss-hmr/package.json +++ b/plugins/vite-plugin-wss-hmr/package.json @@ -1,7 +1,7 @@ { "name": "vite-plugin-wss-hmr", "type": "module", - "version": "0.9.0", + "version": "0.9.1", "description": "", "main": "index.js", "exports": { diff --git a/version b/version index 899f24fc..f514a2f0 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.9.0 \ No newline at end of file +0.9.1 \ No newline at end of file diff --git a/website/docs/blocklet.yml b/website/docs/blocklet.yml index 004a7085..17286e4e 100644 --- a/website/docs/blocklet.yml +++ b/website/docs/blocklet.yml @@ -13,7 +13,7 @@ repository: type: git url: git+https://github.com/blocklet/create-blocklet.git specVersion: 1.2.8 -version: 0.9.0 +version: 0.9.1 logo: logo.png files: - logo.png diff --git a/website/pages/blocklet.yml b/website/pages/blocklet.yml index 320993ab..554b4893 100644 --- a/website/pages/blocklet.yml +++ b/website/pages/blocklet.yml @@ -13,7 +13,7 @@ repository: type: git url: git+https://github.com/blocklet/create-blocklet.git specVersion: 1.2.8 -version: 0.9.0 +version: 0.9.1 logo: logo.png files: - logo.png