mirror of
https://github.com/Nezumi-2711/onedrive-vercel-index.git
synced 2026-09-22 05:32:01 +00:00
add support for pdf previews with pdf.js
This commit is contained in:
@@ -1,4 +1,22 @@
|
||||
module.exports = {
|
||||
webpack: (config) => {
|
||||
// load worker files as a urls with `file-loader`
|
||||
config.module.rules.unshift({
|
||||
test: /pdf\.worker\.(min\.)?js/,
|
||||
use: [
|
||||
{
|
||||
loader: "file-loader",
|
||||
options: {
|
||||
name: "[contenthash].[ext]",
|
||||
publicPath: "_next/static/worker",
|
||||
outputPath: "static/worker"
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
return config;
|
||||
},
|
||||
reactStrictMode: true,
|
||||
images: {
|
||||
domains: ['public.dm.files.1drv.com'],
|
||||
|
||||
Reference in New Issue
Block a user