Я использую Vue Cli 3 с поддержкой машинописи.Точно так же как angular, я пытаюсь включить специфичный для компонента файл scss в файл машинописи.Как импортировать и использовать файл scss в компоненте?
Мой код выглядит следующим образом:
Файл HelloWorld.ts:
import { Component, Vue } from 'vue-property-decorator';
import WithRender from './hello-world.html';
@WithRender
@Component
export default class HelloWorld extends Vue {
}
hello-world.html file:
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
</div>
файл hello-world.scss:
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}