Skip to content

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

Open
@devunion

Description

@devunion

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions