简体   繁体   中英

Importing css files from node modules in meteor

I am using the froala editor in meteor and react. The froala editor requires you to import css files. https://www.froala.com/wysiwyg-editor/docs/framework-plugins/react When i import for example

import 'froala-editor/css/froala_style.min.css';

The server crashes and gives me an error

SyntaxError: Unexpected token .

It seems to be parsing the file as javascript. I am using meteor version 1.5.2. What is the correct way to import css files from node modules in meteor 1.5.2?

您可以在主样式表中使用@import语法导入css,而不是在组件中执行。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM