Table of Contents
.vue Single File Component (SFC) Specification" >.vue Single File Component (SFC) Specification
1. <template>Template block
2. <script>Script block
3. <style>Style block
4. Custom language block
5. All language blocks Support src import
vue-loader feature overview" >vue-loader feature overview
Preprocessing" >Preprocessing
Little chestnut: css uses sass preprocessing
CSS scope: scope" >CSS scope: scope
When using scope, the root node of the child component will be affected by the parent component scope CSS
Enable the parent component to use the ' >>> ' or ' /deep/ ' depth selector to act on the child component
动态生成的DOM内容不受scope style的影响,但可以使用深度选择器进行样式改变
使用scope作用域不能弃用class或id等
在递归组件中注意后代选择器
CSS模块模式:module" >CSS模块模式:module
配置
使用
为多个style自定义标识符
结合预处理
.vue中自定义节点/语言块" >.vue中自定义节点/语言块
小栗子:自定义语言块 <myblock>
热重载:不刷新页面的更新" >热重载:不刷新页面的更新
热加载是默认启动的,当以下情况下关闭:
功能组件" >功能组件
静态资源url是如何处理的" >静态资源url是如何处理的
URL路径解析规则:
Home Web Front-end JS Tutorial Detailed analysis of SFC and vue-loader in Vue

Detailed analysis of SFC and vue-loader in Vue

Jul 21, 2018 am 11:19 AM
vue-loader vue.js

This article shares with you a specific analysis of SFC and vue-loader in Vue. The content is very good. Friends in need can refer to it. I hope it can help everyone.

Official website: https://vue-loader.vuejs.org/zh/
vue-loader is a webpack loader. Simply put, it converts vue files into JS modules. When the babel-loader or bubble-loader configuration is detected, ES2015 is automatically supported;
Using vue-loader, you can write a component in the form of Vue Single-File Component (SFC), that is, a single file component.

.vue Single File Component (SFC) Specification

1.