mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 02:15:01 +00:00
Avoid library build warnings
This commit is contained in:
parent
d4a841846c
commit
3e0417267a
2 changed files with 23 additions and 2 deletions
|
|
@ -15,7 +15,7 @@ import {
|
|||
} from "../actionTypes";
|
||||
|
||||
import { MEDIA_STATUS } from "../constants";
|
||||
import { openMediaFileDialog } from "./";
|
||||
import { openMediaFileDialog } from "./files";
|
||||
import { GetState, Dispatch, Thunk, Action } from "../types";
|
||||
import * as Selectors from "../selectors";
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,28 @@ async function build() {
|
|||
outputFile: bundleDesc.output.file,
|
||||
minify: bundleDesc.minify,
|
||||
});
|
||||
const bundle = await rollup({ input: bundleDesc.input, plugins });
|
||||
const bundle = await rollup({
|
||||
input: bundleDesc.input,
|
||||
plugins,
|
||||
onwarn: (warning, warn) => {
|
||||
// Suppress expected circular dependency warnings from external libraries
|
||||
if (warning.code === "CIRCULAR_DEPENDENCY") {
|
||||
const message = warning.message || "";
|
||||
// Skip warnings for known external library circular dependencies
|
||||
if (
|
||||
message.includes("polyfill-node") ||
|
||||
message.includes("readable-stream") ||
|
||||
message.includes("jszip") ||
|
||||
message.includes("music-metadata") ||
|
||||
message.includes("node_modules")
|
||||
) {
|
||||
return; // Don't show these warnings
|
||||
}
|
||||
}
|
||||
// Show all other warnings
|
||||
warn(warning);
|
||||
},
|
||||
});
|
||||
await bundle.write({
|
||||
sourcemap: true,
|
||||
...bundleDesc.output,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue