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

[5.8] Reset webpack file for none preset #28462

Merged
merged 1 commit into from
May 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/Illuminate/Foundation/Console/Presets/None.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public static function install()
{
static::updatePackages();
static::updateBootstrapping();
static::updateWebpackConfiguration();

tap(new Filesystem, function ($filesystem) {
$filesystem->deleteDirectory(resource_path('js/components'));
Expand Down Expand Up @@ -58,4 +59,14 @@ protected static function updateBootstrapping()
copy(__DIR__.'/none-stubs/app.js', resource_path('js/app.js'));
copy(__DIR__.'/none-stubs/bootstrap.js', resource_path('js/bootstrap.js'));
}

/**
* Update the Webpack configuration.
*
* @return void
*/
protected static function updateWebpackConfiguration()
{
copy(__DIR__.'/none-stubs/webpack.mix.js', base_path('webpack.mix.js'));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const mix = require('laravel-mix');

/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/

mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');