Hi, been searching around the web on a guide or steps to create a vue project with laravel mix but without using the core laravel.
I found a simple tut here for vue and installed laravel mix.
I changed the scripts inside my package.json to match with the laravel-mix scripts and when I run npm run dev, sass files are compiling but the main.js where vue was initialized is not compiling. No errors in the console actually.
Can anyone had this issue before or had a better tut so that I can follow? thanks in advance!
Well the thing I did to get this work was getting the basic Vue setup from the Laravel repository and just add laravel-mix. You can also override a lot of places, for example
// webpack.mix.js
let mix = require('laravel-mix');
let LiveReloadPlugin = require('webpack-livereload-plugin');
mix.webpackConfig({
plugins: [
new LiveReloadPlugin()
]
});
mix.options({
extractVueStyles: true
});
mix.setPublicPath('../web')
.js('js/app.js', 'main.js')
.sass('sass/app.scss', 'main.css');
If you set the public path you're free to load any file you want from that directory ;)