Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-09-30 21:10:05 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2019-10-15 23:38:33 +0300
commitbe5965e3ae4ea1b8e1df028b83ea3533d1e3bd2f (patch)
treeb23c04c72db586c7dcf686203d8831e3ff591894 /webpack.common.js
parentbc495aff638f532870575f8646fe4ad14375183c (diff)
Build CKEditor from source to disable more features
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'webpack.common.js')
-rw-r--r--webpack.common.js29
1 files changed, 27 insertions, 2 deletions
diff --git a/webpack.common.js b/webpack.common.js
index 4368db184..e9286ca90 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -1,8 +1,15 @@
const path = require('path');
const BundleAnalyzerPlugin = require('@bundle-analyzer/webpack-plugin')
+const CKEditorWebpackPlugin = require('@ckeditor/ckeditor5-dev-webpack-plugin');
+const {styles} = require('@ckeditor/ckeditor5-dev-utils');
const { VueLoaderPlugin } = require('vue-loader');
const plugins = [
+ // CKEditor needs its own plugin to be built using webpack.
+ new CKEditorWebpackPlugin({
+ // See https://ckeditor.com/docs/ckeditor5/latest/features/ui-language.html
+ language: 'en'
+ }),
new VueLoaderPlugin()
]
@@ -46,7 +53,10 @@ module.exports = {
{
test: /\.js$/,
loader: 'babel-loader',
- exclude: /node_modules/
+ exclude: /node_modules/,
+ include: [
+ path.join(__dirname, 'node_modules', '@ckeditor')
+ ],
},
{
test: /\.(png|jpg|gif)$/,
@@ -61,7 +71,22 @@ module.exports = {
{
loader: 'url-loader'
}
- ]
+ ],
+ exclude: path.join(__dirname, 'node_modules', '@ckeditor')
+ },
+ {
+ test: /ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/,
+ loader: 'raw-loader'
+ },
+ {
+ test: /ckeditor5-[^/\\]+[/\\].+\.css$/,
+ loader: 'postcss-loader',
+ options: styles.getPostCssConfig({
+ themeImporter: {
+ themePath: require.resolve('@ckeditor/ckeditor5-theme-lark'),
+ },
+ minify: true
+ })
}
]
},