Skip to content

Commit 82f0a49

Browse files
committed
Fix directory name in webpack.mix.js file for inertia-vue scaffolding
1 parent 32d144a commit 82f0a49

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

stubs/inertia-vue/webpack.mix.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ const mix = require('laravel-mix');
22
const path = require('path');
33

44
mix.setPublicPath('./webroot')
5-
.js('assets/js/app.js', 'public/js')
6-
.sass('assets/css/app.css', 'public/css/app.css')
5+
.js('assets/js/app.js', 'webroot/js')
6+
.sass('assets/sass/app.scss', 'webroot/css')
77
.webpackConfig({
88
output: { chunkFilename: 'js/[name].js?id=[chunkhash]' },
99
resolve: {

tests/TestCase/Command/AssetMixCommandTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ public function testGenerateCommandCreatesInertiaVueScaffolding()
209209
"import { InertiaApp } from '@inertiajs/inertia-vue'",
210210
file_get_contents($directoryPaths['to_assets_js_app'])
211211
);
212+
$this->assertContains(".setPublicPath('./webroot')", $webpackMixJsContents);
212213
$this->assertContains("vue$: 'vue/dist/vue.runtime.esm.js", $webpackMixJsContents);
214+
$this->assertContains("'@': path.resolve('assets/js'),", $webpackMixJsContents);
213215
}
214216

215217
private function commonDirectoryExistsAssertions($paths)

0 commit comments

Comments
 (0)