Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to import under webpack 5 without config overrides because of missing .mjs in imports. #271

Open
kitsunde opened this issue Apr 16, 2022 · 5 comments

Comments

@kitsunde
Copy link

kitsunde commented Apr 16, 2022

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: webpack/webpack.js.org#3975

@FelizCoder
Copy link

Struggeling with react import as well. Were you able to resolve the problem somehow?

@kitsunde
Copy link
Author

@FelizCoder What I wrote above about updating the config with the example is the solution. You need to set fullySpecified to false.

@FelizCoder
Copy link

@kitsunde Thank you for the fast Answer. Cannnot find where to paste that snippet.

@kitsunde
Copy link
Author

@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.

@marr
Copy link

marr commented Nov 10, 2022

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 -- webpack/webpack#11467 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants