KABBOUCHI / laravel-mix-vue3

A Laravel Mix extension for Vue 3, Typescript and JSX.
23 stars 2 forks source link

Getting a [webpack-cli] ReferenceError: File is not defined - Laravel 8 #11

Closed eddiedane closed 3 years ago

eddiedane commented 3 years ago

I created a fresh laravel project ran npm install

then followed the installation guide for laravel-mix-vue3 running these commands

npm install laravel-mix-vue3 --save-dev

npm install @types/webpack-env @vue/compiler-sfc vue-loader@next laravel-mix-vue3 --save-dev

then i update my webpack.mix.js file with

const mix = require("laravel-mix"); require("laravel-mix-vue3"); mix.vue3("resources/js/app.js", "public/js");

then I get an error

[webpack-cli] ReferenceError: File is not defined at S:\Eddie\dev\web\projects\vue\onegleam\node_modules\laravel-mix-vue3\index.js:63:44

I have tried starting afresh, creating a new laravel project and running all the command again an again but it sill gives me same error. for some reason theFile variable in index.js seems undefined

entry = [].concat(entry).map((file) => new File(file)); output = new File(output);

I really don't know what to do, am very confused as am trying vue for the first time.

KABBOUCHI commented 3 years ago

Hey, @eddiedane

New Laravel projects don't need this plugin anymore, they ship with Mix v6 now.

https://github.com/laravel/laravel/blob/21c0aed802a69838ba848d93228e725067a2e205/package.json#L14

https://laravel-mix.com/docs/6.0/vue

eddiedane commented 3 years ago

Hey, @eddiedane

New Laravel projects don't need this plugin anymore, they ship with Mix v6 now.

https://github.com/laravel/laravel/blob/21c0aed802a69838ba848d93228e725067a2e205/package.json#L14

https://laravel-mix.com/docs/6.0/vue

mehn! thanks was almost going crazy...!