-
Notifications
You must be signed in to change notification settings - Fork 280
Description
使用的版本
latest
版本号
0.0.60(其他版本貌似一样)
你的安装方式
NPM 依赖
你的操作系统
MacOS
你的浏览器
Chrome
你的项目编程语言
Vue 3
问题描述
引入依赖不能直接使用且导致报错
如何复现
直接引入报错如下:

18:08:39 [vite] (client) Pre-transform error: Failed to resolve import "' + t4 + '" from "node_modules/.vite/deps/vue-plugin-hiprint.js?v=81afbe93". Does the file exist?
Plugin: vite:import-analysis
File: 。。。。。。/node_modules/.vite/deps/vue-plugin-hiprint.js?v=81afbe93:1:45
1 | import * as __require_for_vite_mTNzGU from "' + t4 + '";
| ^
2 | import {
3 | _typeof as _typeof2,
18:08:39 [vite] Internal server error: Failed to resolve import "' + t4 + '" from "node_modules/.vite/deps/vue-plugin-hiprint.js?v=81afbe93". Does the file exist?
Plugin: vite:import-analysis
File: 。。。。。/node_modules/.vite/deps/vue-plugin-hiprint.js?v=81afbe93:1:45
1 | import * as __require_for_vite_KOASCj from "' + t4 + '";
| ^
2 | import {
3 | _typeof as _typeof2,
修改 vite.config.js里的exclude: ["vue-plugin-hiprint"]后报错如下:

[vite] Internal server error: Transform failed with 1 error:
:15:316201: ERROR: Unterminated string literal
Plugin: originjs:commonjs
File: 。。。。。。/node_modules/vue-plugin-hiprint/dist/vue-plugin-hiprint.js?v=3c03eb99
预期结果
希望引入依赖后能直接使用
实际结果
报错
截图或视频
[在这里上传图片]
这个问题是否已经存在?
- 我已经搜索过现有的问题 (https://github.com/CcSimple/vue-plugin-hiprint/issues)