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

Unable to import default and specific objects form a component #8

Open
devunion opened this issue Oct 17, 2022 · 0 comments
Open

Unable to import default and specific objects form a component #8

devunion opened this issue Oct 17, 2022 · 0 comments

Comments

@devunion
Copy link

Hello, I'm trying to port my app from Webpack to ESBuild and see the following problem with imports resolving:

module.vue:
<template></template>
<script>
export const FOO = 'foo';
export default {
  data() {
    return {
      bar: 'bar'
    }
  }
}
</script>

app.js:
import Module, {FOO} from './module.vue';

console.log('Module: ', Module);
console.log('FOO: ', FOO);

Error:

Error: Build failed with 1 error:
test2/app.js:1:16: ERROR: No matching export in "test2/module.vue" for import "FOO"

This kind of import does not work in the app. Is there any option to configure the plugin to resolve the problem?

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

1 participant