Skip to content

使用vite-plugin-html编译时ERROR #3321

@leeseett

Description

@leeseett

问题描述
vite.config.js 无法使用vite-plugin-html,只要引用这个插件就报错

复现步骤
[复现问题的步骤]

  1. yarn add vite-plugin-html -D
  2. 修改vite.config.js文件,就只引用 import { createHtmlPlugin } from 'vite-plugin-html'
    3.yarn dev:mp-weixin
    image

预期结果
控制台不报错

实际结果
Snipaste_2022-03-08_18-35-03

ERROR (node:30592) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at D:\work\mdmf\jkmf-stand-promotions\node_modules\vuex\package.json.
Update this package.json to use a subpath pattern like "./*".
(Use node --trace-deprecation ... to show where the warning was created)

系统信息:

  • 发行平台: 微信小程序
  • 操作系统 win11
  • uni-app版本 3.0.0-alpha-3040120220307001

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions