zstd decompression no longer works in a NextJS project since 7.6.0
Closed this issue · 4 comments
I have a NextJS project which uses JSRoot in a static export of the site. Since #274 was merged zstd decompression no longer works.
In the browser console I see:
GET http://localhost:3000/_next/static/chunks/base/zstd.mjs
Loading module from “http://localhost:3000/_next/static/chunks/base/zstd.mjs” was blocked because of a disallowed MIME type (“text/html”).
Loading failed for the module with source “http://localhost:3000/_next/static/chunks/base/zstd.mjs”.
Looking more closely I see this is caused by a 404 error and zstd.mjs not being found. Looking at the code it's not clear to me how import(/* webpackIgnore: true */ './base/zstd.mjs')
is supposed to work though I'm a bit out of my comfort zone.
How you deploy JSROOT? Are you using node.js tools?
Maybe it is mistake in JSROOT to specify /* webpackIgnore: true */
for zstd.mjs
and lzma.mjs
.
It can be that because of such specifier these modules are not correctly deployed.
Can you try to copy modules/base/zstd.mjs
and modules/base/lzma.mjs
to your _next/static/chunks/base/
folder by hand?
From my side I will remove such specifier from source code.
Grate!
I had other zstd-related issue, which is also fixed now in master.
I will try to provide patch release soon.