arquero
arquero copied to clipboard
Fails to import under webpack 5 without config overrides because of missing `.mjs` in imports.
I was trying to setup arquero
with react, but it won't resolve because WebPack5 needs fullySpecified
as the import paths both in arquero and in the current used version of apache-arrow do not import with .mjs
file endings.
rules: [
{
test: /\.(js|mjs)$/,
resolve: {
fullySpecified: false
}
// ...
],
ref: https://github.com/webpack/webpack.js.org/issues/3975
Struggeling with react import as well. Were you able to resolve the problem somehow?
@FelizCoder What I wrote above about updating the config with the example is the solution. You need to set fullySpecified to false.
@kitsunde Thank you for the fast Answer. Cannnot find where to paste that snippet.
@kitsunde Thank you for the fast Answer. Cannnot find where to paste that snippet.
Follow the ref I posted. It links to the doc update: https://github.com/webpack/webpack.js.org/pull/3981/files if it's still unclear, you might want to find a webpack community to help walk you through how to do it in your webpack config, it's not specific to this project.
Any chance the lib can use proper import syntax (specifying js/mjs extension on imported file)? I am stuck with webpack4, which doesn't support the workaround that webpack5 does. It's summarized well here why webpack5 defaults to fullySpecified: true
-- https://github.com/webpack/webpack/issues/11467#issuecomment-769487234