mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 02:15:01 +00:00
Avoid ts warnings in vite build
This commit is contained in:
parent
b230cc66c5
commit
7b87c2302c
1 changed files with 11 additions and 10 deletions
|
|
@ -26,16 +26,17 @@ export function getPlugins({ minify, outputFile, vite }) {
|
|||
// Needed for music-metadata-browser in the Webamp bundle which depends upon
|
||||
// being able to use some polyfillable node APIs
|
||||
nodePolyfills(),
|
||||
typescript({
|
||||
compilerOptions: {
|
||||
jsx: "react-jsx",
|
||||
module: "esnext",
|
||||
declarationDir: vite ? "dist/demo-site/declarations" : undefined,
|
||||
// Without this it complains that files will be overwritten, but I don't
|
||||
// think this ever gets used...
|
||||
outDir: vite ? undefined : "./tsBuilt",
|
||||
},
|
||||
}),
|
||||
// Vite handles TypeScript natively, so only use the plugin for Rollup builds
|
||||
vite
|
||||
? null
|
||||
: typescript({
|
||||
compilerOptions: {
|
||||
jsx: "react-jsx",
|
||||
module: "esnext",
|
||||
declarationDir: "dist/demo-site/declarations",
|
||||
outDir: "./tsBuilt",
|
||||
},
|
||||
}),
|
||||
// Enable importing .json files. But Vite already enables this, so enabling it there
|
||||
// causes it to try to parse the js version as JSON.
|
||||
vite ? null : json(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue