mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 08:41:37 +00:00
chore(deno): add deno 2.0 support
This commit is contained in:
@ -4,6 +4,12 @@
|
|||||||
// enabled: process.env.ANALYZE === 'true',
|
// enabled: process.env.ANALYZE === 'true',
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
const urlLoaderPath = 'url-loader';
|
||||||
|
const urlLoaderPathUrl = new URL(urlLoaderPath, import.meta.url).href;
|
||||||
|
|
||||||
|
const fileLoaderPath = 'file-loader';
|
||||||
|
const fileLoaderPathUrl = new URL(fileLoaderPath, import.meta.url).href;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {import('next').NextConfig}
|
* @type {import('next').NextConfig}
|
||||||
*/
|
*/
|
||||||
@ -38,10 +44,10 @@ const nextConfig = {
|
|||||||
exclude: config.exclude,
|
exclude: config.exclude,
|
||||||
use: [
|
use: [
|
||||||
{
|
{
|
||||||
loader: require.resolve('url-loader'),
|
loader: urlLoaderPathUrl,
|
||||||
options: {
|
options: {
|
||||||
limit: config.inlineImageLimit,
|
limit: config.inlineImageLimit,
|
||||||
fallback: require.resolve('file-loader'),
|
fallback: fileLoaderPathUrl,
|
||||||
publicPath: `${config.assetPrefix}/_next/static/images/`,
|
publicPath: `${config.assetPrefix}/_next/static/images/`,
|
||||||
outputPath: `${isServer ? '../' : ''}static/images/`,
|
outputPath: `${isServer ? '../' : ''}static/images/`,
|
||||||
name: '[name]-[hash].[ext]',
|
name: '[name]-[hash].[ext]',
|
||||||
|
Reference in New Issue
Block a user