Astro Info
Astro v5.18.1
Vite v6.4.1
Node v22.22.2
System Windows (x64)
Package Manager npm
Output server
Adapter @astrojs/cloudflare (v12.6.13)
Integrations @wix/astro (v2.34.0)
@wix/astro/auth
@wix/astro/monitor
@wix/astro/backend-extensions
@wix/astro/backoffice-extensions
@wix/astro/trusted-backoffice-extensions
@wix/astro/custom-elements
@wix/astro/html-embeds
@wix/astro/payment-links
@wix/astro/viewer-api
@wix/astro/embedded-scripts
@wix/astro/site-components
@wix/astro-site-component-panels-extensions
@wix/astro/viewer-services
@wix/astro/function-libraries
@wix/astro/context-providers
@wix/astro/robots
@astrojs/react (v4.4.2)
√ Copy to clipboard? ... no
If this issue only occurs in one browser, which browser is a problem?
All browsers
Describe the Bug
A package @needle-tools/usd uses .data and .wasm files.
But Astro gives this error when using this package:
node_modules/@needle-tools/usd/src/bindings/index.js:43:15: ERROR: No loader is configured for ".data" files: node_modules/@needle-tools/usd/src/bindings/emHdBindings.data?url
I tried adding a loader for it like this:
export default defineConfig({
vite: {
assetsInclude: ["**/*.data", "**/*.wasm"],
optimizeDeps: {
exclude: ["@needle-tools/usd"],
esbuildOptions: {
loader: {
".data": "file",
".wasm": "file",
},
},
},
ssr: {
external: ["@needle-tools/usd"],
},
},
});
And even tried excluding from being scanned by esbuild.
But nothing works and I keep getting same error.
What's the expected result?
Expected result is for Astro to build without throwing this error
Link to Minimal Reproducible Example
I just want to know how to add loader properly in config for .data and .wasm files
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
All browsers
Describe the Bug
A package
@needle-tools/usduses .data and .wasm files.But Astro gives this error when using this package:
I tried adding a loader for it like this:
And even tried excluding from being scanned by esbuild.
But nothing works and I keep getting same error.
What's the expected result?
Expected result is for Astro to build without throwing this error
Link to Minimal Reproducible Example
I just want to know how to add loader properly in config for .data and .wasm files
Participation