From 1fac8ef8e2d713b5914c1bdc2a6f66d5d9f75494 Mon Sep 17 00:00:00 2001 From: Vinzenz Rosenkranz Date: Mon, 16 Oct 2023 14:21:56 +0200 Subject: [PATCH] add font handling to open webpack config Signed-off-by: Vinzenz Rosenkranz --- webpack.mix.open.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/webpack.mix.open.js b/webpack.mix.open.js index f52f4671b..4db90c8d5 100644 --- a/webpack.mix.open.js +++ b/webpack.mix.open.js @@ -34,10 +34,18 @@ const appName = process.env.APP_NAME; | */ mix.js('resources/js/open.js', 'public/js/open').vue() - .options({ runtimeChunkPath: 'js/open' }) + .options({ + runtimeChunkPath: 'js/open', + fileLoaderDirs: { + fonts: appPath + 'fonts' + }, + }) .sourceMaps() .webpackConfig(webpack => { return { + output: { + publicPath: '/' + appPath + }, plugins: [ new webpack.DefinePlugin({ __APPNAME__: `'${appName}'`, @@ -46,6 +54,10 @@ mix.js('resources/js/open.js', 'public/js/open').vue() } }) .extract(); + +if(`public/${appPath}fonts` !== 'public/fonts') { + mix.copyDirectory(`public/${appPath}fonts`, 'public/fonts'); +} mix.alias({ '@': path.join(__dirname, 'resources/js'), vue$: path.join(__dirname, 'node_modules/vue/dist/vue.esm-bundler.js')