Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/372.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何配置babel以导入css_Javascript_Css_Babeljs - Fatal编程技术网

Javascript 如何配置babel以导入css

Javascript 如何配置babel以导入css,javascript,css,babeljs,Javascript,Css,Babeljs,如何使babel to导入.css到.js而不使用网页包,因为在我的项目中没有网页包,我想通过.babelrc配置 现在我还没有这个配置文件 预装babel watcher和babel软件包:babel-cli@6巴别塔预设反应-app@3巴别塔-loader@latest 有我用,没有。宝贝 import '../js/pagination.js'; import '../css/pagination.css'; export default class Pagination extends

如何使babel to导入.css到.js而不使用网页包,因为在我的项目中没有网页包,我想通过.babelrc配置

现在我还没有这个配置文件

预装babel watcher和babel软件包:babel-cli@6巴别塔预设反应-app@3巴别塔-loader@latest 有我用,没有。宝贝

import '../js/pagination.js';
import '../css/pagination.css';

export default class Pagination extends React.Component{
此时我得到了下一个错误

     Failed to load module script: The server 
     responded with a non-JavaScript MIME type of 
     "text/css". Strict MIME type checking is 
     enforced for module scripts per HTML spec.
这将帮助您: