I am a beginner to this framework. i have added new css files in my sass folder and compiled them successfully to use.
How can i add new js file in assets folder and compile them to use ?
I am a beginner to this framework. i have added new css files in my sass folder and compiled them successfully to use.
How can i add new js file in assets folder and compile them to use ?
You can do somethink like this but before stop npm compiling:
mix.js('resources/assets/js/app.js', 'public/js')
.js('resources/frontend/js/scripts.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.sass('resources/frontend/scss/style.scss', 'public/css');
And then run just npm run dev or npm run watch.
i concluded some things as a beginner: 1. we put our js or css files in assets/css, assets/js folder and using webpack.min.js we compile this files and minimize. 2. after compilation, the compiled code generates in public/css, public/js folders accordingly. 3. My js file has some external links and things as i am using a theme for a blog, and it is getting issues in compilation. 4. the solution is to put your files directly in public/js or public/css folders .
If anyone has any further suggession... please share.
Thanks