I want to install Vue 3 into a Laravel 8 project, but I don't want to use something like laravel/ui
because it adds Bootstrap and a bunch of other stuff I don't want.
I tried npm i vue@next
, and it installs Vue 3, but when I try to do import { createApp } from 'vue';
in app.js
, etc., I get a bunch of Webpack errors on npm run dev
with Laravel Mix ("laravel-mix": "^6.0.6",
in package.json
).
This is the webpack.mix.js
file I'm using:
const mix = require('laravel-mix');
mix
.extract(['vue'])
.js('resources/js/app.js', 'public/js/')
.vue()
.version();
And I get this error when I run npm run dev
:
[webpack-cli] Error: Cannot find module 'webpack/lib/rules/DescriptionDataMatcherRulePlugin'
(Stack trace here.)
Does anyone know how to simply install Vue 3 (without a bunch of additional scaffolding) in Laravel 8? Thank you.