在Symfony 4中添加引导程序

托尔加

在我的Symfony 4项目中,我尝试将bootstrap作为导入添加到

yarn add bootstrap --dev

在遵循文档时,我尝试按以下方式导入引导程序:

@import "~bootstrap/scss/bootstrap";

当我运行yarn encore dev时,它说未找到模块。

比我尝试过的:

@import "../../node_modules/bootstrap/scss/bootstrap.scss";

输出为:

Syntax Error: ModuleNotFoundError: Module not found: Error: Can't resolve './alert' in 'C:\Users\tolga\GIT\artifex\node_modules\bootstrap\scss'

我想念什么?alert.scss存在,但找不到模块。我应该怎么做?

托尔加

看来我以某种方式解决了问题。首先,导入目录是这样的:

@import "../../node_modules/bootstrap";

我不知道为什么波浪号没有用。添加sass-loader并没有帮助。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章