@@ -23,7 +23,8 @@ export function generateWebpackConfig(opts: SimplrWebpackOptions): Configuration
2323 staticContentDirectoryOutput : opts . staticContentDirectoryOutput || "./static" ,
2424 fontsDirectoryOutput : opts . fontsDirectoryOutput || "./fonts" ,
2525 emitHtml : opts . emitHtml != null ? opts . emitHtml : true ,
26- target : opts . target || "web"
26+ target : opts . target || "web" ,
27+ publicPath : opts . publicPath || "/"
2728 } ;
2829 const fullOutputDirectoryLocation = path . resolve ( options . projectDirectory , options . outputDirectory ) ;
2930 const fullTsconfigLocation = path . resolve ( options . projectDirectory , Helpers . TS_CONFIG_NAME ) ;
@@ -52,7 +53,7 @@ export function generateWebpackConfig(opts: SimplrWebpackOptions): Configuration
5253 filename : "[name].bundle.js" ,
5354 chunkFilename : "[name].bundle.js" ,
5455 path : fullOutputDirectoryLocation ,
55- publicPath : "/"
56+ publicPath : opts . publicPath
5657 } ,
5758 resolve : {
5859 extensions : [ ".ts" , ".tsx" , ".js" , ".json" , ".scss" , ".css" ] ,
@@ -105,7 +106,8 @@ export function generateWebpackConfig(opts: SimplrWebpackOptions): Configuration
105106 {
106107 test : / \. ( w o f f | w o f f 2 | e o t | t t f | o t f ) $ / ,
107108 options : {
108- name : `./${ options . fontsDirectoryOutput } /[name].[ext]`
109+ name : `./${ options . fontsDirectoryOutput } /[name].[ext]` ,
110+ publicPath : opts . publicPath
109111 } ,
110112 loader : "file-loader"
111113 }
0 commit comments