简体   繁体   English

使用导入在ES6中获取CSS文件(Java脚本6)

[英]Using import to get css files in ES6 (java script 6)

I saw the next ES6 code: 我看到了下一个ES6代码:

import '../node_modules/spectre.css/dist/spectre.min.css';  
import './styles.css';

what's the meaning of using . 使用的含义是什么。 .. ... .... just after .. ... .... 刚过

import '

The dots indicate which directory you're starting from. 点表示您从哪个目录开始。

./index.js looks for index.js in the current directory. ./index.js在当前目录中查找index.js。 ../index.js looks for index.js inside the parent directory. ../index.js在父目录中查找index.js。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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