Skip to content

Commit

Permalink
chore: include only code snippets for the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Dec 3, 2023
1 parent ad2d303 commit f11fdf3
Showing 1 changed file with 1 addition and 38 deletions.
39 changes: 1 addition & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export default {
<details>
<summary>Webpack</summary><br>

From version `v0.26.0+` you need to use `default` export:
```ts
// webpack.config.js
module.exports = {
Expand All @@ -80,23 +79,11 @@ module.exports = {
}
```

If you are using a version earlier than `v0.26.0`:
```ts
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-vue-components/webpack')({ /* options */ }),
],
}
```

<br></details>

<details>
<summary>Rspack</summary><br>

From version `v0.26.0+` you need to use `default` export:
```ts
// rspack.config.js
module.exports = {
Expand All @@ -107,17 +94,6 @@ module.exports = {
}
```

If you are using a version earlier than `v0.26.0`:
```ts
// rspack.config.js
module.exports = {
/* ... */
plugins: [
require('unplugin-vue-components/rspack')({ /* options */ }),
],
}
```

<br></details>

<details>
Expand All @@ -130,7 +106,6 @@ You might not need this plugin for Nuxt. Use [`@nuxt/components`](https://github
<details>
<summary>Vue CLI</summary><br>

From version `v0.26.0+` you need to use `default` export:
```ts
// vue.config.js
module.exports = {
Expand All @@ -141,7 +116,7 @@ module.exports = {
}
```

or you can rename the Vue configuration file to `vue.config.mjs` and use static import syntax (you should use latest `@vue/cli-service ^5.0.8`):
You can also rename the Vue configuration file to `vue.config.mjs` and use static import syntax (you should use latest `@vue/cli-service ^5.0.8`):
```ts
// vue.config.mjs
import Components from 'unplugin-vue-components/webpack'
Expand All @@ -155,18 +130,6 @@ export default {
}
```

If you are using a version earlier than `v0.26.0`:
```ts
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-vue-components/webpack')({ /* options */ }),
],
},
}
```

<br></details>

<details>
Expand Down

0 comments on commit f11fdf3

Please sign in to comment.