See this pull request before you read on, please.
Hence, this beginner underwent the same difficulty in 2019 as mine now if I am right. I think the reason why that error happend on him or her is because he or she used the wrong code import Vue from 'vue'
without a build step.
Of course the new fearure importmap (at the third code snippet) allow us to run the code import ... from 'vue'
in plain JavaScript without a build step.
Therefore, am I right with this conclusion:
Without a build step such as Vite (and except for using importmap
), the code import ... from 'vue'
can’t run, instead, we have to use const { createApp } = Vue
(in the case of Vue 3)?
Let me know if I am wrong.