mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 02:15:01 +00:00
Inline music-metadata lazy loads to fix builds
This commit is contained in:
parent
1ba58c81e1
commit
b5bf64a55d
2 changed files with 9 additions and 3 deletions
|
|
@ -44,6 +44,9 @@ const BUNDLES = [
|
|||
file: "built/webamp.bundle.js",
|
||||
format: "umd",
|
||||
name: "Webamp",
|
||||
// music-metadata uses dynamic imports, so we need to inline them
|
||||
// to avoid issues with the UMD build.
|
||||
inlineDynamicImports: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -54,6 +57,9 @@ const BUNDLES = [
|
|||
file: "built/webamp.bundle.min.js",
|
||||
format: "umd",
|
||||
name: "Webamp",
|
||||
// music-metadata uses dynamic imports, so we need to inline them
|
||||
// to avoid issues with the UMD build.
|
||||
inlineDynamicImports: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -63,6 +69,9 @@ const BUNDLES = [
|
|||
output: {
|
||||
file: "built/webamp.bundle.min.mjs",
|
||||
format: "module",
|
||||
// music-metadata uses dynamic imports, so we need to inline them
|
||||
// to avoid issues with the UMD build.
|
||||
inlineDynamicImports: true,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -23,9 +23,6 @@ export function getPlugins({ minify, outputFile, vite }) {
|
|||
// https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
|
||||
// TODO: We could offer a version which does not inline React/React-DOM
|
||||
nodeResolve(),
|
||||
// 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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue