rmariuzzo / Laravel-JS-Localization

🌐 Convert your Laravel messages and consume them in the front-end!
https://github.com/rmariuzzo/laravel-js-localization
MIT License
596 stars 170 forks source link

compiler.plugin is not a function #157

Closed Daniel-Monroy closed 3 years ago

Daniel-Monroy commented 3 years ago

In laravel 8 with Inertia, when executing npm run dev

Captura de Pantalla 2021-01-31 a la(s) 20 41 12 Captura de Pantalla 2021-01-31 a la(s) 20 39 52
Daniel-Monroy commented 3 years ago

This Plugin Webpack Shell Plugin Next worked for me.

duikb00t commented 3 years ago

I solved it by using this setup:

Laravel-mix 6 
require('laravel-mix-serve');
mix.serve('php artisan lang:js --no-lib');

No need anymore for Webpack Shell Plugin Next.

mahmoud-ow commented 3 years ago

require('laravel-mix-serve'); mix.serve('php artisan lang:js ');

Don't forget to install this package for this solution to work npm i laravel-mix-serve

geowrgetudor commented 2 years ago

This Plugin Webpack Shell Plugin Next worked for me.

If someone needs some copy-pasta, here you go :)

const WebpackShellPluginNext = require("webpack-shell-plugin-next");

mix.webpackConfig({
    plugins: [
        new WebpackShellPluginNext({
            onBuildStart: {
                scripts: [
                    "php artisan lang:js resources/js/messages.js --quiet",
                ],
                blocking: true,
                parallel: false,
            },
            onBuildEnd: {},
        }),
    ],
});
joe94113 commented 2 years ago

@duikb00t @mahmoud-ow Thank,save my day