Mar 2, 2022
0
Level 4
Migrating Vue2 to Vue3.1 Issue
Currently have issues with converting our Vue2 and Vue3 When trying to migrate use @vue/compat as an alias to vue . I keep Receiving that vue is not installed into the Application
Current Code for our Webpack.mix.js
mix.js("resources/js/app.js", "public/js")
.sass("resources/sass/app.scss", "public/css")
.sourceMaps()
.webpackConfig({
devtool: "source-map",
resolve: {
alias: {
vue: '@vue/compat'
}
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
compilerOptions: {
compatConfig: {
MODE: 2
}
}
}
}
]
}
})
.options({
processCssUrls: false,
});
mix.webpackConfig({
output: {
chunkFilename: "js/[name].js?id=[chunkhash]",
publicPath: "/",
}
});
``` ERROR Failed to compile with 5 errors
This dependency was not found:
* vue in ./node_modules/laravel-vue-datatable/dist/laravel-vue-datatable.common.js, ./resources/js/app.js and 3 others
To install it, you can run: npm install --save vue
Please or to participate in this conversation.