Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for VUE 3 #2440

Closed
pflirae opened this issue Jul 17, 2020 · 9 comments
Closed

Support for VUE 3 #2440

pflirae opened this issue Jul 17, 2020 · 9 comments

Comments

@pflirae
Copy link

pflirae commented Jul 17, 2020

When it is planned to include VUE 3 support ??

@LaravelFreelancerNL
Copy link

With vuejs 3 hitting RC status this has become a very welcome improvement.

@ghost
Copy link

ghost commented Aug 4, 2020

Agreed. Like like to hear a proposed timeline as well.

@Vac1911
Copy link

Vac1911 commented Aug 26, 2020

Update?

@mayanksdudakiya
Copy link

Any update, please?

@Masterbranch1
Copy link

Is there any update of VUE 3 support?

@rdarcy1
Copy link

rdarcy1 commented Sep 21, 2020

Until support is added, you can use webpack directly:

// webpack.config.js

const path = require('path');
const { VueLoaderPlugin } = require('vue-loader');

module.exports = (env = {}) => ({
    mode: env.prod ? 'production' : 'development',
    devtool: env.prod ? 'source-map' : 'eval-cheap-module-source-map',
    entry: [
        path.resolve(__dirname, './resources/js/app.ts'),
    ],
    output: {
        path: path.resolve(__dirname, './public/js'),
        filename: "app.js"
    },
    resolve: {
        alias: {
            '@': path.resolve(__dirname, './resources/js'),
        },
        extensions: ['.ts', '.js', '.vue'],
    },
    module: {
        rules: [
            {
                test: /\.vue$/,
                use: 'vue-loader'
            },
            {
                test: /\.ts$/,
                loader: 'ts-loader',
                options: {
                    appendTsSuffixTo: [/\.vue$/],
                }
            },
        ]
    },
    plugins: [
        new VueLoaderPlugin(),
    ],
});

Minimal Laravel config based on https://github.com/vuejs/vue-next-webpack-preview
Note this isn't transpiling for backwards compatibility.

Run with webpack or npx webpack

@KABBOUCHI
Copy link

@mayanksdudakiya and @Masterbranch1 you can use temporary this package https://github.com/KABBOUCHI/laravel-mix-vue3 until the official support is out.

@rrrrando
Copy link

This solution also works for me:

https://stackoverflow.com/questions/63967346/install-vue-3-0-in-laravel/63994238#63994238

If you use inline template like i do then you have to switch to using slots since inline-template is deprecated.

@JeffreyWay
Copy link
Collaborator

Support is in Mix v6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants