git clone https://github.com/youseffatomi/create-html-component.git
cd create-html-component
npm i
npm startpages -> index.ejssee EJS repo
<!DOCTYPE html>
<html lang="en">
<%- include("./../components/layout/head") %>
<body></body>
</html>you can only import file or image from root directory because ejs cannot found file
//===>false
<img src="./assets/x.png" /> //===>true
<img src="/assets/x.png" />see tailwindcss webpage
scss-> main
@import "./font.scss";
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
see webpack webpage
If you want to disable minify css , you must delete this
optimization: {
minimizer: [new CssMinimizerPlugin()],
},output: {
path: join(__dirname, "build"),
},new BrowserSyncPlugin({
port: 3000,
})tailwind.config.js
fontFamily: {
sans: ["FontWeb"],
},
npm run build├── style
├── script
├── assets
│ ├── fonts
│ ├── images
├── index.html