Skip to content

Commit

Permalink
docs: Replace WebpackShellPlugin with WebpackShellPluginNext (#183)
Browse files Browse the repository at this point in the history
Newer webpack versions aren't compatible with webpack-shell-plugin (which is extremely outdated). 
webpack-shell-plugin-next does the exact same thing but is compatible with Webpack 4 and 5.
  • Loading branch information
Datalink-Wouter authored Jun 19, 2023
1 parent 69cecb4 commit 0abc390
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,18 @@ elixir(function(mix) {

### Using [Laravel's Mix](https://laravel.com/docs/5.4/mix) with Laravel 5.4+ (optional)

Add "[webpack-shell-plugin](https://www.npmjs.com/package/webpack-shell-plugin)" to package.json's "devDependencies" section.
Add "[webpack-shell-plugin-next](https://www.npmjs.com/package/webpack-shell-plugin-next)" to package.json's "devDependencies" section.

Add the following to webpack.mix.js:

```js
const WebpackShellPlugin = require('webpack-shell-plugin');
const WebpackShellPluginNext = require('webpack-shell-plugin-next');

// Add shell command plugin configured to create JavaScript language file
mix.webpackConfig({
plugins:
[
new WebpackShellPlugin({onBuildStart:['php artisan lang:js --quiet'], onBuildEnd:[]})
new WebpackShellPluginNext({onBuildStart:['php artisan lang:js --quiet'], onBuildEnd:[]})
]
});
```
Expand Down

0 comments on commit 0abc390

Please sign in to comment.