Skip to content

Commit a8c7fc5

Browse files
authored
feat: mordernize plugin infrastructure and sync with latest vite-plugin-solid (#260)
1 parent 94e37ae commit a8c7fc5

28 files changed

Lines changed: 5167 additions & 3427 deletions

‎.npmrc‎

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎.vscode/extensions.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["dbaeumer.vscode-eslint"]
2+
"recommendations": ["dbaeumer.vscode-eslint"]
33
}

‎.vscode/settings.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"typescript.tsdk": "node_modules/typescript/lib"
2+
"typescript.tsdk": "node_modules/typescript/lib"
33
}

‎README.md‎

Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ $ pnpm add -D unplugin-solid
2020
import Solid from "unplugin-solid/vite";
2121

2222
export default defineConfig({
23-
plugins: [
24-
Solid({
25-
/* options */
26-
}),
27-
],
23+
plugins: [Solid({/* options */})],
2824
});
2925
```
3026

@@ -38,12 +34,10 @@ export default defineConfig({
3834
import Solid from "unplugin-solid/rollup";
3935

4036
export default {
41-
plugins: [
42-
Solid({
43-
/* options */
44-
}),
45-
// other plugins
46-
],
37+
plugins: [
38+
Solid({/* options */}),
39+
// other plugins
40+
],
4741
};
4842
```
4943

@@ -57,12 +51,10 @@ export default {
5751
import Solid from "unplugin-solid/rolldown";
5852

5953
export default {
60-
plugins: [
61-
Solid({
62-
/* options */
63-
}),
64-
// other plugins
65-
],
54+
plugins: [
55+
Solid({/* options */}),
56+
// other plugins
57+
],
6658
};
6759
```
6860

@@ -74,12 +66,8 @@ export default {
7466
```ts
7567
// webpack.config.js
7668
module.exports = {
77-
/* ... */
78-
plugins: [
79-
require("unplugin-solid/webpack")({
80-
/* options */
81-
}),
82-
],
69+
/* ... */
70+
plugins: [require("unplugin-solid/webpack")({/* options */})],
8371
};
8472
```
8573

@@ -93,12 +81,8 @@ module.exports = {
9381
import { build } from "esbuild";
9482

9583
build({
96-
/* ... */
97-
plugins: [
98-
require("unplugin-solid/esbuild")({
99-
/* options */
100-
}),
101-
],
84+
/* ... */
85+
plugins: [require("unplugin-solid/esbuild")({/* options */})],
10286
});
10387
```
10488

@@ -112,11 +96,7 @@ build({
11296
import Solid from "unplugin-solid/astro";
11397

11498
export default defineConfig({
115-
integrations: [
116-
Solid({
117-
/* options */
118-
}),
119-
],
99+
integrations: [Solid({/* options */})],
120100
});
121101
```
122102

‎eslint.config.js‎

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
import { so1ve } from "@so1ve/eslint-config";
22

33
export default so1ve({
4-
ignores: ["**/fixtures/**"],
4+
ignores: ["**/fixtures/**"],
5+
overrides: {
6+
test: {
7+
"vitest/no-standalone-expect": "off",
8+
},
9+
},
10+
}).override("so1ve/yaml/pnpm-workspace-yaml-sort", {
11+
rules: {
12+
"yaml/sort-keys": [
13+
"error",
14+
{
15+
order: [
16+
"gitChecks",
17+
"ignoreWorkspaceRootCheck",
18+
"allowBuilds",
19+
"shellEmulator",
20+
"packageExtensions",
21+
],
22+
pathPattern: "^$",
23+
},
24+
{
25+
order: { type: "asc" },
26+
pathPattern: ".*",
27+
},
28+
],
29+
},
530
});

‎package.json‎

Lines changed: 102 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,104 @@
11
{
2-
"name": "unplugin-solid",
3-
"version": "1.0.0",
4-
"packageManager": "[email protected]",
5-
"author": "Ray <[email protected]> (@so1ve)",
6-
"type": "module",
7-
"description": "Transform Solid.js code in various bundlers powered by unplugin",
8-
"keywords": [
9-
"astro",
10-
"rolldown",
11-
"rollup",
12-
"rspack",
13-
"solid",
14-
"solid.js",
15-
"solidjs",
16-
"transform",
17-
"unplugin",
18-
"vite",
19-
"webpack"
20-
],
21-
"homepage": "https://github.com/unplugin/unplugin-solid#readme",
22-
"repository": {
23-
"type": "git",
24-
"url": "git+https://github.com/unplugin/unplugin-solid.git"
25-
},
26-
"bugs": {
27-
"url": "https://github.com/unplugin/unplugin-solid/issues"
28-
},
29-
"license": "MIT",
30-
"sideEffects": false,
31-
"exports": {
32-
".": "./dist/index.js",
33-
"./astro": "./dist/astro.js",
34-
"./esbuild": "./dist/esbuild.js",
35-
"./package.json": "./package.json",
36-
"./rolldown": "./dist/rolldown.js",
37-
"./rollup": "./dist/rollup.js",
38-
"./rspack": "./dist/rspack.js",
39-
"./types": "./dist/types.js",
40-
"./vite": "./dist/vite.js",
41-
"./webpack": "./dist/webpack.js"
42-
},
43-
"main": "./dist/index.js",
44-
"module": "./dist/index.js",
45-
"types": "./dist/index.d.ts",
46-
"typesVersions": {
47-
"*": {
48-
"*": [
49-
"./dist/*",
50-
"./dist/index.d.ts"
51-
]
52-
}
53-
},
54-
"files": [
55-
"dist"
56-
],
57-
"engines": {
58-
"node": "^20.19.0 || >=22.12.0"
59-
},
60-
"publishConfig": {
61-
"access": "public"
62-
},
63-
"scripts": {
64-
"build": "tsdown",
65-
"lint": "eslint . || prettier . --check",
66-
"lint:fix": "eslint . --fix || prettier . --write",
67-
"prepublishOnly": "nr build",
68-
"release": "bumpp --commit --push --tag && pnpm publish",
69-
"test": "vitest",
70-
"typecheck": "tsgo --noEmit"
71-
},
72-
"dependencies": {
73-
"@babel/core": "^7.28.3",
74-
"@rollup/pluginutils": "^5.2.0",
75-
"babel-preset-solid": "^1.9.9",
76-
"merge-anything": "^6.0.6",
77-
"solid-refresh": "^0.7.5",
78-
"unplugin": "^2.3.10",
79-
"vitefu": "^1.1.1"
80-
},
81-
"devDependencies": {
82-
"@antfu/ni": "^25.0.0",
83-
"@so1ve/eslint-config": "^3.9.0",
84-
"@so1ve/prettier-config": "^3.9.0",
85-
"@sxzz/test-utils": "^0.5.10",
86-
"@types/babel__core": "^7.20.5",
87-
"@types/node": "^24.3.0",
88-
"@typescript/native-preview": "7.0.0-dev.20251125.1",
89-
"bumpp": "^10.2.3",
90-
"esbuild": "^0.25.9",
91-
"eslint": "^9.34.0",
92-
"prettier": "^3.6.2",
93-
"rollup": "^4.50.0",
94-
"solid-js": "^1.9.9",
95-
"tsdown": "^0.14.2",
96-
"typescript": "^5.9.2",
97-
"unplugin-oxc": "^0.5.1",
98-
"vite": "^7.1.3",
99-
"vite-plugin-solid": "^2.11.8",
100-
"vitest": "^3.2.4",
101-
"webpack": "^5.82.0"
102-
},
103-
"peerDependencies": {
104-
"solid-js": "^1.9.9"
105-
}
2+
"name": "unplugin-solid",
3+
"version": "1.0.0",
4+
"packageManager": "[email protected]",
5+
"author": "Ray <[email protected]> (@so1ve)",
6+
"type": "module",
7+
"description": "Transform Solid.js code in various bundlers powered by unplugin",
8+
"keywords": [
9+
"astro",
10+
"rolldown",
11+
"rollup",
12+
"rspack",
13+
"solid",
14+
"solid.js",
15+
"solidjs",
16+
"transform",
17+
"unplugin",
18+
"vite",
19+
"webpack"
20+
],
21+
"homepage": "https://github.com/unplugin/unplugin-solid#readme",
22+
"repository": {
23+
"type": "git",
24+
"url": "git+https://github.com/unplugin/unplugin-solid.git"
25+
},
26+
"bugs": {
27+
"url": "https://github.com/unplugin/unplugin-solid/issues"
28+
},
29+
"license": "MIT",
30+
"sideEffects": false,
31+
"exports": {
32+
".": "./dist/index.mjs",
33+
"./astro": "./dist/astro.mjs",
34+
"./esbuild": "./dist/esbuild.mjs",
35+
"./rolldown": "./dist/rolldown.mjs",
36+
"./rollup": "./dist/rollup.mjs",
37+
"./rspack": "./dist/rspack.mjs",
38+
"./types": "./dist/types.mjs",
39+
"./vite": "./dist/vite.mjs",
40+
"./webpack": "./dist/webpack.mjs",
41+
"./package.json": "./package.json"
42+
},
43+
"types": "./dist/index.d.mts",
44+
"files": [
45+
"dist"
46+
],
47+
"engines": {
48+
"node": "^22.12.0 || ^24.0.0 || ^26.0.0"
49+
},
50+
"publishConfig": {
51+
"access": "public"
52+
},
53+
"scripts": {
54+
"build": "tsdown",
55+
"lint": "eslint . && prettier . --check",
56+
"lint:fix": "eslint . --fix && prettier . --write",
57+
"prepublishOnly": "nr build",
58+
"release": "bumpp --commit --push --tag && pnpm publish",
59+
"test": "vitest",
60+
"typecheck": "tsc --noEmit"
61+
},
62+
"dependencies": {
63+
"@babel/core": "^7.29.7",
64+
"babel-preset-solid": "^1.9.12",
65+
"merge-anything": "^6.0.6",
66+
"solid-refresh": "^0.7.8",
67+
"unplugin": "^3.3.0",
68+
"vitefu": "^1.1.3"
69+
},
70+
"devDependencies": {
71+
"@antfu/ni": "^30.2.0",
72+
"@so1ve/eslint-config": "^4.6.2",
73+
"@so1ve/prettier-config": "^4.6.2",
74+
"@sxzz/test-utils": "^0.5.18",
75+
"@types/babel__core": "^7.20.5",
76+
"@types/node": "^26.1.1",
77+
"bumpp": "^11.1.0",
78+
"esbuild": "^0.28.1",
79+
"eslint": "^10.7.0",
80+
"prettier": "^3.9.5",
81+
"rollup": "^4.62.2",
82+
"solid-js": "^1.9.14",
83+
"tsdown": "^0.22.7",
84+
"typescript": "^6.0.3",
85+
"unplugin-oxc": "^0.6.1",
86+
"vite": "^8.1.4",
87+
"vite-plugin-solid": "^2.11.12",
88+
"vitest": "^4.1.10",
89+
"webpack": "^5.108.4"
90+
},
91+
"peerDependencies": {
92+
"@testing-library/jest-dom": "^5.16.6 || ^5.17.0 || ^6.0.0",
93+
"solid-js": "^1.9.9",
94+
"vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
95+
},
96+
"peerDependenciesMeta": {
97+
"@testing-library/jest-dom": {
98+
"optional": true
99+
},
100+
"vite": {
101+
"optional": true
102+
}
103+
}
106104
}

0 commit comments

Comments
 (0)