mirror of
https://github.com/suitenumerique/docs.git
synced 2026-04-26 01:25:05 +02:00
♻️(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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user