Jose Cabrera Zuniga
Jose Cabrera Zuniga

Reputation: 2627

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

I saw the next ES6 code:

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

what's the meaning of using . .. ... .... just after

import '

Upvotes: 0

Views: 156

Answers (1)

Ryan Villanueva
Ryan Villanueva

Reputation: 116

The dots indicate which directory you're starting from.

./index.js looks for index.js in the current directory. ../index.js looks for index.js inside the parent directory.

Upvotes: 3

Related Questions