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

Webpack BuildError caused by re-exporting (@unleashit/common) #847

Open
unleashit opened this issue Dec 23, 2023 · 0 comments
Open

Webpack BuildError caused by re-exporting (@unleashit/common) #847

unleashit opened this issue Dec 23, 2023 · 0 comments
Assignees

Comments

@unleashit
Copy link

Package name

@unleashit/common

Entire (stringified) error that I see in my browser console

{
  "error": {
    "code": "BuildError",
    "message": "Failed to build this package.",
    "details": {
      "name": "BuildError",
      "originalError": [
        "/tmp/tmp-build/packages/build-@unleashitcommon-Ytz/node_modules/@unleashit/common/src/index.ts 10:27\nModule parse failed: Unexpected token (10:27)\nYou may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders\n| export * from './lib/utils';\n| export * from './lib/CustomFields';\n> export { formHandler, type OnSubmitArgs } from './lib/formHandler';\n| export {\n|   FetchError,\n @ /tmp/tmp-build/packages/build-@unleashitcommon-Ytz/index.js 1:10-38"
      ]
    }
  }
}

Hi, I've seen a bunch of closed build related issues relating to ES2020+ use but I wasn't sure if re-exporting (maybe export * from X in particular) from a barrel file was still a known issue. The build works fine on my end in either tsup or Webpack 5, but not with BP. In any case, Happy Holidays!

Here's a link to the package in question in case it's helpful: https://github.com/unleashit/npm-library/tree/master/shared/common.

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

2 participants