diff --git a/stubs/inertia-vue/webpack.mix.js b/stubs/inertia-vue/webpack.mix.js index d3ee752..dca2013 100644 --- a/stubs/inertia-vue/webpack.mix.js +++ b/stubs/inertia-vue/webpack.mix.js @@ -2,8 +2,8 @@ const mix = require('laravel-mix'); const path = require('path'); mix.setPublicPath('./webroot') - .js('assets/js/app.js', 'public/js') - .sass('assets/css/app.css', 'public/css/app.css') + .js('assets/js/app.js', 'webroot/js') + .sass('assets/sass/app.scss', 'webroot/css') .webpackConfig({ output: { chunkFilename: 'js/[name].js?id=[chunkhash]' }, resolve: { diff --git a/tests/TestCase/Command/AssetMixCommandTest.php b/tests/TestCase/Command/AssetMixCommandTest.php index 94becae..16e22ca 100644 --- a/tests/TestCase/Command/AssetMixCommandTest.php +++ b/tests/TestCase/Command/AssetMixCommandTest.php @@ -209,7 +209,9 @@ public function testGenerateCommandCreatesInertiaVueScaffolding() "import { InertiaApp } from '@inertiajs/inertia-vue'", file_get_contents($directoryPaths['to_assets_js_app']) ); + $this->assertContains(".setPublicPath('./webroot')", $webpackMixJsContents); $this->assertContains("vue$: 'vue/dist/vue.runtime.esm.js", $webpackMixJsContents); + $this->assertContains("'@': path.resolve('assets/js'),", $webpackMixJsContents); } private function commonDirectoryExistsAssertions($paths)