Skip to content

Commit

Permalink
Fix directory name in webpack.mix.js file for inertia-vue scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
ishanvyas22 committed Aug 23, 2020
1 parent 32d144a commit 82f0a49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stubs/inertia-vue/webpack.mix.js
Expand Up @@ -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: {
Expand Down
2 changes: 2 additions & 0 deletions tests/TestCase/Command/AssetMixCommandTest.php
Expand Up @@ -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)
Expand Down

0 comments on commit 82f0a49

Please sign in to comment.