Skip to content

Commit

Permalink
Chore: Fix webpack chunk output location
Browse files Browse the repository at this point in the history
Output the webpack chunks to a subdirectory so they don't pollute public.
Note that we did not really ask for vendor extraction, but it still happens when using async chunks
(https://github.com/JeffreyWay/laravel-mix/blob/76bb5646e521718a60eb72def4350bc2ad147ec4/test/features/mix.js#L66).
  • Loading branch information
danmichaelo committed Feb 8, 2020
1 parent c9dcf7c commit 3e99a18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions public/vendors~js/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!.gitignore

4 changes: 2 additions & 2 deletions resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Vue.component('edit-form', EditForm)
Vue.component('national-library-search', NationalLibrarySearch)

// Code splitting: Components to be loaded as needed
Vue.component('page-editor', () => import(/* webpackChunkName: "page-editor" */ './components/PageEditor'))
Vue.component('image-viewer', () => import(/* webpackChunkName: "image-viewer" */ './components/ImageViewer'))
Vue.component('page-editor', () => import(/* webpackChunkName: 'js/page-editor' */ './components/PageEditor'))
Vue.component('image-viewer', () => import(/* webpackChunkName: 'js/image-viewer' */ './components/ImageViewer'))


Vue.use(Lang, {
Expand Down

0 comments on commit 3e99a18

Please sign in to comment.