I've just started to learn Vue and I wonder, how is it made? I see in the begining of main.js
import Vue from 'vue'
import App from './App.vue'
and the content of App.vue is not Javascript at all. How is it made to be understandable by Javascript?
When using .vue files in a Vue application, it is necessary to use the vue-loader dependency. This library is a loader for webpack that allows you to create Vue components in a Single-File Components format.
There are many cool features provided by vue-loader:
- Allows using other webpack loaders for each part of a Vue component, for example Sass for and Pug for .
- Allows custom blocks in a .vue file that can have custom loader chains applied to them.
- Treat static assets referenced in and as module dependencies and handle them with webpack loaders.
- Simulate scoped CSS for each component.
- State-preserving hot-reloading during development.