Skip to content

Commit c14f420

Browse files
authored
feat: support rspack (unplugin#637)
1 parent 413dc0c commit c14f420

File tree

4 files changed

+38
-6
lines changed

4 files changed

+38
-6
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ On-demand components auto importing for Vue.
88

99
- 💚 Supports both Vue 2 and Vue 3 out-of-the-box.
1010
- ✨ Supports both components and directives.
11-
- ⚡️ Supports Vite, Webpack, Vue CLI, Rollup, esbuild and more, powered by <a href="https://github.com/unjs/unplugin">unplugin</a>.
11+
- ⚡️ Supports Vite, Webpack, Rspack, Vue CLI, Rollup, esbuild and more, powered by <a href="https://github.com/unjs/unplugin">unplugin</a>.
1212
- 🏝 Tree-shakable, only registers the components you use.
1313
- 🪐 Folder names as namespaces.
1414
- 🦾 Full TypeScript support.
@@ -81,6 +81,21 @@ module.exports = {
8181

8282
<br></details>
8383

84+
<details>
85+
<summary>Rspack</summary><br>
86+
87+
```ts
88+
// rspack.config.js
89+
module.exports = {
90+
/* ... */
91+
plugins: [
92+
require('unplugin-vue-components/rspack')({ /* options */ }),
93+
],
94+
}
95+
```
96+
97+
<br></details>
98+
8499
<details>
85100
<summary>Nuxt</summary><br>
86101

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
"require": "./dist/webpack.js",
4949
"import": "./dist/webpack.mjs"
5050
},
51+
"./rspack": {
52+
"types": "./dist/rspack.d.ts",
53+
"require": "./dist/rspack.js",
54+
"import": "./dist/rspack.mjs"
55+
},
5156
"./esbuild": {
5257
"types": "./dist/esbuild.d.ts",
5358
"require": "./dist/esbuild.js",
@@ -105,7 +110,7 @@
105110
"magic-string": "^0.30.0",
106111
"minimatch": "^7.4.2",
107112
"resolve": "^1.22.1",
108-
"unplugin": "^1.1.0"
113+
"unplugin": "^1.3.1"
109114
},
110115
"devDependencies": {
111116
"@antfu/eslint-config": "^0.36.0",

pnpm-lock.yaml

Lines changed: 13 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/rspack.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import unplugin from '.'
2+
3+
export default unplugin.rspack

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy