1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-26 08:05:23 -04:00

webpack types cleanup

This commit is contained in:
Jake Jarvis 2025-03-27 13:37:28 -04:00
parent 8308b635b8
commit a4aa15d2c5
Signed by: jake
SSH Key Fingerprint: SHA256:nCkvAjYA6XaSPUqc4TfbBQTpzr8Xj7ritg/sGInCdkc
4 changed files with 25 additions and 16 deletions

23
global.d.ts vendored Normal file
View File

@ -0,0 +1,23 @@
/**
* @module global
*/
/// <reference types="webpack/module" />
// see nextConfig.webpack in next.config.ts for non-standard "asset/resource" module rules.
// https://webpack.js.org/guides/typescript/#importing-other-assets
declare module "*.mp4" {
const src: string;
export default src;
}
declare module "*.webm" {
const src: string;
export default src;
}
declare module "*.vtt" {
const src: string;
export default src;
}

View File

@ -30,7 +30,7 @@ const nextConfig: NextConfig = {
],
},
outputFileTracingExcludes: {
"*": ["./public/**/*", "**/*.mp4", "**/*.webm"],
"*": ["./public/**/*", "**/*.mp4", "**/*.webm", "**/*.vtt"],
},
webpack: (config) => {
config.module.rules.push({

View File

@ -19,6 +19,6 @@
}
]
},
"include": ["next-env.d.ts", "webpack.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"include": ["next-env.d.ts", "global.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}

14
webpack.d.ts vendored
View File

@ -1,14 +0,0 @@
declare module "*.mp4" {
const src: string;
export default src;
}
declare module "*.webm" {
const src: string;
export default src;
}
declare module "*.vtt" {
const src: string;
export default src;
}