Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Laravel Mix V6

Muah edited this page Jan 19, 2021 · 9 revisions

the new mix requires some extra setup to make things work especially that we are now using wp v5, so

mix.js('resources/assets/js/app.js', 'public/js').vue()

mix.webpackConfig({
    resolve: { // until mix issue is solved
        alias: {
            // get arround errors like 
            // 'window.Vue.use is not a function' or 'Vue is not a constructor'
            vue: 'vue/dist/vue.js'
        }
    },
    plugins: [
        // fix ReferenceError: Buffer/process is not defined
        new webpack.ProvidePlugin({
            process : 'process/browser',
            Buffer  : ['buffer', 'Buffer']
        })
    ]
})
Clone this wiki locally