From 3e99a18a98a693c36e85dce715d9ccf23bfe67f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Michael=20O=2E=20Hegg=C3=B8?= Date: Sat, 8 Feb 2020 17:48:49 +0100 Subject: [PATCH] Chore: Fix webpack chunk output location 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). --- public/vendors~js/.gitignore | 3 +++ resources/js/app.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 public/vendors~js/.gitignore diff --git a/public/vendors~js/.gitignore b/public/vendors~js/.gitignore new file mode 100644 index 00000000..a5baada1 --- /dev/null +++ b/public/vendors~js/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore + diff --git a/resources/js/app.js b/resources/js/app.js index 65940b77..691e7c99 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -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, {