Skip to content

Commit

Permalink
add font handling to open webpack config
Browse files Browse the repository at this point in the history
Signed-off-by: Vinzenz Rosenkranz <[email protected]>
  • Loading branch information
v1r0x committed Oct 16, 2023
1 parent 65dd478 commit 1fac8ef
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion webpack.mix.open.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}'`,
Expand All @@ -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')
Expand Down

0 comments on commit 1fac8ef

Please sign in to comment.