I want use custom font in my app. in dev mode, everything ok, but when i package it, not any font detected.
i use this suggestion for remove extra ./dist/, but not help!
Can you let me know where your fonts are situated in your project?
Here's what works for me:
const rootPath = process.cwd();
output: {
path: path.join(rootPath, 'app/dist'),
publicPath: '../dist/',
filename: 'renderer.prod.js'
},
Important to note, in my setup I have the following file structure.
projectRoot\webpack_configs -- Config files
projectRoot\app -- Application files root
projectRoot\app\scss\fonts -- Fonts
I don't recall if these settings in particular were changed to accommodate my nested webpack config folder.
You can extract your application's app.asar via the following terminal command. Run this in the folder where your app.asar is to unpack it to a folder called unpackedAsar
asar extract app.asar unpackedAsar
This should help with debugging. Happy to help further if I can. There's certainly a steep learning curve.
Solved! '../dist/' instead of './dist' solve my problem. Thnx Slapbox.
Happy to help! If this is all wrapped up, feel free to close this issue at your convenience.
Most helpful comment
Can you let me know where your fonts are situated in your project?
Here's what works for me:
Important to note, in my setup I have the following file structure.
projectRoot\webpack_configs-- Config filesprojectRoot\app-- Application files rootprojectRoot\app\scss\fonts-- FontsI don't recall if these settings in particular were changed to accommodate my nested webpack config folder.
You can extract your application's
app.asarvia the following terminal command. Run this in the folder where your app.asar is to unpack it to a folder calledunpackedAsarasar extract app.asar unpackedAsarThis should help with debugging. Happy to help further if I can. There's certainly a steep learning curve.