我有这个文件结构:
有人可以帮我知道如何通过配置 Vite 访问 pdf.js 吗?
我尝试过:
在vite.config.js中,导出默认的defineConfig:
plugins: [
laravel({
input: [
'node_modules/pdfjs-dist/build/pdf.js'
],
refresh: true,
}),
],
我在我的 app.blade.php 中使用了 @vite:
@vite([
'node_modules/pdfjs-dist/build/pdf.js'
])
我得到了这个错误: 无法在 Vite 清单中找到文件:node_modules/pdfjs-dist/build/pdf.js。
谁能给我解释一下吗?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号