I have a working setup, with sass
and parcel bundler
installed through npm
. Problem is - every time I add Bootstrap
, either by installing through npm
or downloading the package by myself, my developer server (run by parcel
) starts lagging very much. Every change I make takes about 7 s. for the server to build.
In Sass
installation guide it is written that npm
installation
runs somewhat slower
so I tried installing Sass
by downloading the package and adding it to my PATH, following the guide, but that didn't help. My question is - can someone please confirm that it is possible running SCSS
and Bootstrap
, without using extensions - couse currently that's the only option I see. How do other developers solve this problem - or maybe it is something wrong with my setup?
PS. When trying to use Bootstrap
CDN - server stops responding to my scss
file, it only responds to html
- which is something I don't understand as well.
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="scss/main.scss">
<!-- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> -->
</head>
<body>
<h1>test</h1>
<h2>test 1,2</h2>
<!-- bootstrap CDN : -->
<!-- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> -->
</body>
</html>
main.scss
@import "~bootstrap/scss/bootstrap";
body {
background-color: rgb(194, 147, 98);
}
package.json
{
"name": "48.-new-saas-setup",
"version": "1.0.0",
"description": "",
"source": "./src/index.html",
"scripts": {
"dev": "parcel",
"build": "parcel build"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@parcel/transformer-sass": "^2.4.1",
"parcel": "^2.4.1",
"sass": "^1.50.1"
},
"dependencies": {
"bootstrap": "^5.1.3"
}
}
folder structure:
3 first server builds :