♻️(frontend) adapt emoji copying to turbopack build

We were previously copying the emoji assets
in a webpack plugin, but that doesn't run with
turbopack. This commit moves the copying to a
pre-build script, which runs regardless of the
bundler used.
This commit is contained in:
Anthony LC
2026-03-11 11:27:34 +01:00
parent 679b29e2e0
commit 9337c4b1d5
5 changed files with 24 additions and 33 deletions

View File

@@ -1,7 +1,5 @@
const crypto = require('crypto');
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const { InjectManifest } = require('workbox-webpack-plugin');
const buildId = crypto.randomBytes(256).toString('hex').slice(0, 8);
@@ -54,22 +52,6 @@ const nextConfig = {
},
);
// Copy necessary fonts from node_modules to public directory during build or dev
config.plugins.push(
new CopyPlugin({
patterns: [
{
from: path.resolve(
__dirname,
'../../node_modules/emoji-datasource-apple/img/apple/64',
),
to: path.resolve(__dirname, 'public/assets/fonts/emoji'),
force: true,
},
],
}),
);
if (!isServer && process.env.NEXT_PUBLIC_SW_DEACTIVATED !== 'true') {
config.plugins.push(
new InjectManifest({