how to add external css file into laravel-mix s
i wan change my custom style into sass by laravel-mix how to add my file into webpack.mix.js
in resources/css/app.scss
@import "yourfile";
my custom css file is in public/css how to add that in webpack.mix.js may I change the css directory into resource file or no
Yes, your stuff should be in /resources. Mix will copy the compiled assets to /public. Look at how the default is set up in your webpack.mix.js file.
my file extension is css i should change that to sass
can you show me and example please
- copy your css file to /resources/assets/css/yourfile.css
- add
@import "../css/yourfile.css"; to the bottom of /resources/assets/sass/app.scss
- If you haven't already installed the node dependencies, run
npm install
- run
npm run dev
Your custom css is now included in the /public/css/app.css file.
how to import external js file? I want to add multiple js file externally and use as app.js.
Please or to participate in this conversation.