hedgedoc/craco.config.js
Tilman Vatteroth c867673072
Replace emojibase-data with emoji-picker-element-data (#1293)
* Add Twemoji 13.1
* Use emoji-picker-element instead of emojibase

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-06-05 22:16:46 +02:00

31 lines
932 B
JavaScript

/*
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
const CopyPlugin = require('copy-webpack-plugin');
const { when } = require('@craco/craco');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
module.exports = {
webpack: {
plugins: {
add: [
new CopyPlugin({
patterns: [
{ from: 'node_modules/@hpcc-js/wasm/dist/graphvizlib.wasm', to: 'static/js' },
{ from: 'node_modules/@hpcc-js/wasm/dist/expatlib.wasm', to: 'static/js' },
{ from: 'node_modules/emoji-picker-element-data/en/emojibase/data.json', to: 'static/js/emoji-data.json' }
],
}),
...when(Boolean(process.env.ANALYZE), () => [
new BundleAnalyzerPlugin({
analyzerMode: "static",
generateStatsFile: true
})
], [])
]
}
}
}