don't cachebust twemoji, so we can dynamically load it
This commit is contained in:
parent
913bc6da93
commit
8aed8eae52
1 changed files with 13 additions and 0 deletions
|
@ -18,6 +18,10 @@ module.exports = {
|
||||||
// CSS themes
|
// CSS themes
|
||||||
"theme-light": "./node_modules/matrix-react-sdk/res/themes/light/css/light.scss",
|
"theme-light": "./node_modules/matrix-react-sdk/res/themes/light/css/light.scss",
|
||||||
"theme-dark": "./node_modules/matrix-react-sdk/res/themes/dark/css/dark.scss",
|
"theme-dark": "./node_modules/matrix-react-sdk/res/themes/dark/css/dark.scss",
|
||||||
|
|
||||||
|
// twemoji fonts which need to be dynamically loaded
|
||||||
|
"twemoji-colr": "./node_modules/matrix-react-sdk/res/fonts/Twemoji_Mozilla/TwemojiMozilla-colr.woff2",
|
||||||
|
"twemoji-sbix": "./node_modules/matrix-react-sdk/res/fonts/Twemoji_Mozilla/TwemojiMozilla-sbix.woff2",
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
|
@ -75,6 +79,15 @@ module.exports = {
|
||||||
// Use a content-based hash in the name so that we can set a long cache
|
// Use a content-based hash in the name so that we can set a long cache
|
||||||
// lifetime for assets while still delivering changes quickly.
|
// lifetime for assets while still delivering changes quickly.
|
||||||
oneOf: [
|
oneOf: [
|
||||||
|
{
|
||||||
|
// allow runtime loading of twemoji (at the expense of cachebusting).
|
||||||
|
resource: /TwemojiMozilla.*\.woff2$/,
|
||||||
|
loader: 'file-loader',
|
||||||
|
options: {
|
||||||
|
name: 'fonts/[name].[ext]',
|
||||||
|
outputPath: getImgOutputPath,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
// Images referenced in CSS files
|
// Images referenced in CSS files
|
||||||
issuer: /\.(scss|css)$/,
|
issuer: /\.(scss|css)$/,
|
||||||
|
|
Loading…
Add table
Reference in a new issue