mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-26 03:25:23 -04:00
webpack types cleanup
This commit is contained in:
parent
8308b635b8
commit
a4aa15d2c5
23
global.d.ts
vendored
Normal file
23
global.d.ts
vendored
Normal 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;
|
||||
}
|
@ -30,7 +30,7 @@ const nextConfig: NextConfig = {
|
||||
],
|
||||
},
|
||||
outputFileTracingExcludes: {
|
||||
"*": ["./public/**/*", "**/*.mp4", "**/*.webm"],
|
||||
"*": ["./public/**/*", "**/*.mp4", "**/*.webm", "**/*.vtt"],
|
||||
},
|
||||
webpack: (config) => {
|
||||
config.module.rules.push({
|
||||
|
@ -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
14
webpack.d.ts
vendored
@ -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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user