Answers for "import css transpile scss webpack"

CSS
0

npm compile sass to css

#compiles a single file manually.
 node-sass my-styles.scss my-styles.css 
 #compiles all the files in a folder manually.
 node-sass my-sass-folder/ -o my-css-folder/
 # compiles all the files in a folder automatically 
 #whenever the source file(s) are modified. -w adds 
 #a watch for changes to the file(s).
 node-sass -w sass/ -o css/
Posted by: Guest on January-28-2022
1

scss import another file

// foundation/_code.scss
code {
  padding: .25em;
}

// foundation/_lists.scss
ul {
  text-align: left;
}

// style.scss
@use 'foundation/code';
@use 'foundation/lists';

// output styles.css
code {
  padding: .25em;
}

ul {
  text-align: left;
}
Posted by: Guest on April-11-2022

Browse Popular Code Answers by Language