-
-
Notifications
You must be signed in to change notification settings - Fork 136
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Hi,
First I wan't to thank you for this librairy which is going to be very useful for me.
I can't manage to import from a module inside a script
tag of a .vue file
For example :
<template>
<div class="test">Test</div>
</template>
<script>
import { label } from "./../tools.js";
export default {
name: "appWorld",
computed: {
...Vuex.mapState(["count"]),
},
mounted() {
console.log(`Component ${this.$options.name} mounted - ${label}`);
},
};
</script>
<style scoped>
div.test {
color: red;
}
</style>
The line
_import { label } from "./../tools.js";_
raises the following error.
_'import' and 'export' may appear only with 'sourceType: "module"' (2:0)_
I tried adding type="module"
to the script
tag but it didn't work either.
Is it possible to do that ? How ?
Thank you for your answer
Raphael
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request