Skip to content

Commit

Permalink
chore(vite-plugin-blocklet): skip embed plugin while embeds is empty (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
LancelotLewis authored Aug 13, 2024
1 parent 553e55b commit b3c999b
Show file tree
Hide file tree
Showing 23 changed files with 29 additions and 22 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "create-blocklet",
"private": true,
"version": "0.9.0",
"version": "0.9.1",
"description": "",
"keywords": [],
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-blocklet",
"version": "0.9.0",
"version": "0.9.1",
"exports": "./index.js",
"type": "module",
"repository": "[email protected]:blocklet/create-blocklet.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/react-dapp-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/react-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/react-gun-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/react-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/solidjs-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/solidjs-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/svelte-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/svelte-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/vue-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/vue-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/vue-ts-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/vue2-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/templates/vue2-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
5 changes: 4 additions & 1 deletion plugins/vite-plugin-blocklet/libs/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export default function createEmbedPlugin(options) {
});
}

if (inputEmbeds.length === 0) {
return [];
}

return [
{
name: 'blocklet:embed:serve',
Expand All @@ -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]: '' });
Expand Down
2 changes: 1 addition & 1 deletion plugins/vite-plugin-blocklet/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vite-plugin-blocklet",
"type": "module",
"version": "0.9.0",
"version": "0.9.1",
"description": "",
"main": "index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion plugins/vite-plugin-wss-hmr/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vite-plugin-wss-hmr",
"type": "module",
"version": "0.9.0",
"version": "0.9.1",
"description": "",
"main": "index.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.0
0.9.1
2 changes: 1 addition & 1 deletion website/docs/blocklet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion website/pages/blocklet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b3c999b

Please sign in to comment.