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 479d42e commit 69219ce
Showing 1 changed file with 1 addition and 55 deletions.
56 changes: 1 addition & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export default {
<details>
<summary>Webpack</summary><br>

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

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

<br></details>

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

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

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

<br></details>

<details>
Expand All @@ -150,7 +126,6 @@ module.exports = {
<details>
<summary>Vue CLI</summary><br>

From version `v0.17.0+` you need to use `default` export:
```ts
// vue.config.js
module.exports = {
Expand All @@ -161,7 +136,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 AutoImport from 'unplugin-auto-import/webpack'
Expand All @@ -175,18 +150,6 @@ export default {
}
```

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

<br></details>

<details>
Expand All @@ -204,7 +167,6 @@ export default defineConfig({
})
```

From version `v0.17.0+` you need to use `default` export:
```ts
// quasar.conf.js [Webpack]
const AutoImportPlugin = require('unplugin-auto-import/webpack').default
Expand All @@ -220,22 +182,6 @@ module.exports = {
}
```

If you are using a version earlier than `v0.17.0`:
```ts
// quasar.conf.js [Webpack]
const AutoImportPlugin = require('unplugin-auto-import/webpack')

module.exports = {
build: {
chainWebpack(chain) {
chain.plugin('unplugin-auto-import').use(
AutoImportPlugin({ /* options */ }),
)
},
},
}
```

<br></details>


Expand Down

0 comments on commit 69219ce

Please sign in to comment.