diff --git a/examples/sites/demos/pc/webdoc/import-components-en.md b/examples/sites/demos/pc/webdoc/import-components-en.md index 5f3ce4fd77..fca471de8d 100644 --- a/examples/sites/demos/pc/webdoc/import-components-en.md +++ b/examples/sites/demos/pc/webdoc/import-components-en.md @@ -22,19 +22,19 @@ Vite import autoImportPlugin from '@opentiny/unplugin-tiny-vue' export default { - plugins: [autoImportPlugin()] + plugins: [autoImportPlugin('vite')] } ``` Webpack ```js -// webpack.config.js +// vue.config.js const autoImportPlugin = require('@opentiny/unplugin-tiny-vue') module.exports = { - plugins: [autoImportPlugin()] + plugins: [autoImportPlugin('webpack')] } ``` diff --git a/examples/sites/demos/pc/webdoc/import-components.md b/examples/sites/demos/pc/webdoc/import-components.md index 4d99d2ce86..d21fd7395e 100644 --- a/examples/sites/demos/pc/webdoc/import-components.md +++ b/examples/sites/demos/pc/webdoc/import-components.md @@ -29,7 +29,7 @@ export default { Webpack ```js -// webpack.config.js +// vue.config.js const autoImportPlugin = require('@opentiny/unplugin-tiny-vue') @@ -64,7 +64,7 @@ export default { Webpack ```js -// webpack.config.js +// vue.config.js const Components = require('unplugin-vue-components/webpack').default const TinyVueResolver = require('@opentiny/unplugin-tiny-vue').TinyVueResolver @@ -158,7 +158,7 @@ export default { } ``` -#### 温馨提示: +#### 温馨提示 因为 `pnpm` 工程的特点之一是:项目中显示引入的依赖需要提前在 `package.json` 中声明(防止幽灵依赖),所以在 `pnpm` 工程使用该插件时需要在 `package.json` 中声明项目用到的每一个 `TinyVue` 组件依赖(`TinyVue` 每个组件都是一个 `npm` 包)。依赖声明可以参考以下配置: