VueJS - 找不到模块

时间:2020-12-25 16:52:47

标签: vue.js

我很难在 Vue 组件中导入 CSS 文件。基本上我有以下组件:

<template>
    <html>
        <body>
        ...
        </body>
    </html>
</template>

现在我需要导入这个模板所需的 CSS 和 JavaScript 文件,所以我尝试了这个:

<template>
    <html>
        <body>
        ...
        </body>
    </html>
</template>

<style>

@import './assets/css/bootstrap.min'
@import './assets/css/jquery.mCustomScrollbar.min'
@import './assets/css/style.css'

</style>

但我不断收到以下错误:

ModuleNotFoundError in 
Module not found: Error: Can't resolve './assets/css/bootstrap.min'

我在这里做错了什么?

文件夹的结构如下:

-assets
-component.vue

0 个答案:

没有答案
相关问题