diff options
author | polo <ordipolo@gmx.fr> | 2022-02-20 20:49:13 +0100 |
---|---|---|
committer | polo <ordipolo@gmx.fr> | 2022-02-20 20:49:13 +0100 |
commit | 758b3f359341f963946d6d34e8f39d2a9c1f6040 (patch) | |
tree | 3efb7f1da4be4157615419e630eb0d6efbcb6c3d /lib/ckeditor5/webpack.config.js | |
parent | a5ddb2af05644972de70dab3225bab0797a93934 (diff) | |
download | melaine-758b3f359341f963946d6d34e8f39d2a9c1f6040.zip |
debuggage
Diffstat (limited to 'lib/ckeditor5/webpack.config.js')
-rw-r--r-- | lib/ckeditor5/webpack.config.js | 192 |
1 files changed, 96 insertions, 96 deletions
diff --git a/lib/ckeditor5/webpack.config.js b/lib/ckeditor5/webpack.config.js index 4a69362..fd5cc3e 100644 --- a/lib/ckeditor5/webpack.config.js +++ b/lib/ckeditor5/webpack.config.js | |||
@@ -1,96 +1,96 @@ | |||
1 | /** | 1 | /** |
2 | * @license Copyright (c) 2014-2021, CKSource - Frederico Knabben. All rights reserved. | 2 | * @license Copyright (c) 2014-2022, CKSource Holding sp. z o.o. All rights reserved. |
3 | * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | 3 | * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license |
4 | */ | 4 | */ |
5 | 5 | ||
6 | 'use strict'; | 6 | 'use strict'; |
7 | 7 | ||
8 | /* eslint-env node */ | 8 | /* eslint-env node */ |
9 | 9 | ||
10 | const path = require( 'path' ); | 10 | const path = require( 'path' ); |
11 | const webpack = require( 'webpack' ); | 11 | const webpack = require( 'webpack' ); |
12 | const { bundler, styles } = require( '@ckeditor/ckeditor5-dev-utils' ); | 12 | const { bundler, styles } = require( '@ckeditor/ckeditor5-dev-utils' ); |
13 | const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' ); | 13 | const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' ); |
14 | const TerserWebpackPlugin = require( 'terser-webpack-plugin' ); | 14 | const TerserWebpackPlugin = require( 'terser-webpack-plugin' ); |
15 | 15 | ||
16 | module.exports = { | 16 | module.exports = { |
17 | devtool: 'source-map', | 17 | devtool: 'source-map', |
18 | performance: { hints: false }, | 18 | performance: { hints: false }, |
19 | 19 | ||
20 | entry: path.resolve( __dirname, 'src', 'ckeditor.js' ), | 20 | entry: path.resolve( __dirname, 'src', 'ckeditor.js' ), |
21 | 21 | ||
22 | output: { | 22 | output: { |
23 | // The name under which the editor will be exported. | 23 | // The name under which the editor will be exported. |
24 | library: 'ClassicEditor', | 24 | library: 'ClassicEditor', |
25 | 25 | ||
26 | path: path.resolve( __dirname, 'build' ), | 26 | path: path.resolve( __dirname, 'build' ), |
27 | filename: 'ckeditor.js', | 27 | filename: 'ckeditor.js', |
28 | libraryTarget: 'umd', | 28 | libraryTarget: 'umd', |
29 | libraryExport: 'default' | 29 | libraryExport: 'default' |
30 | }, | 30 | }, |
31 | 31 | ||
32 | optimization: { | 32 | optimization: { |
33 | minimizer: [ | 33 | minimizer: [ |
34 | new TerserWebpackPlugin( { | 34 | new TerserWebpackPlugin( { |
35 | sourceMap: true, | 35 | sourceMap: true, |
36 | terserOptions: { | 36 | terserOptions: { |
37 | output: { | 37 | output: { |
38 | // Preserve CKEditor 5 license comments. | 38 | // Preserve CKEditor 5 license comments. |
39 | comments: /^!/ | 39 | comments: /^!/ |
40 | } | 40 | } |
41 | }, | 41 | }, |
42 | extractComments: false | 42 | extractComments: false |
43 | } ) | 43 | } ) |
44 | ] | 44 | ] |
45 | }, | 45 | }, |
46 | 46 | ||
47 | plugins: [ | 47 | plugins: [ |
48 | new CKEditorWebpackPlugin( { | 48 | new CKEditorWebpackPlugin( { |
49 | // UI language. Language codes follow the https://en.wikipedia.org/wiki/ISO_639-1 format. | 49 | // UI language. Language codes follow the https://en.wikipedia.org/wiki/ISO_639-1 format. |
50 | // When changing the built-in language, remember to also change it in the editor's configuration (src/ckeditor.js). | 50 | // When changing the built-in language, remember to also change it in the editor's configuration (src/ckeditor.js). |
51 | language: 'fr', | 51 | language: 'fr', |
52 | additionalLanguages: 'all' | 52 | additionalLanguages: 'all' |
53 | } ), | 53 | } ), |
54 | new webpack.BannerPlugin( { | 54 | new webpack.BannerPlugin( { |
55 | banner: bundler.getLicenseBanner(), | 55 | banner: bundler.getLicenseBanner(), |
56 | raw: true | 56 | raw: true |
57 | } ) | 57 | } ) |
58 | ], | 58 | ], |
59 | 59 | ||
60 | module: { | 60 | module: { |
61 | rules: [ | 61 | rules: [ |
62 | { | 62 | { |
63 | test: /\.svg$/, | 63 | test: /\.svg$/, |
64 | use: [ 'raw-loader' ] | 64 | use: [ 'raw-loader' ] |
65 | }, | 65 | }, |
66 | { | 66 | { |
67 | test: /\.css$/, | 67 | test: /\.css$/, |
68 | use: [ | 68 | use: [ |
69 | { | 69 | { |
70 | loader: 'style-loader', | 70 | loader: 'style-loader', |
71 | options: { | 71 | options: { |
72 | injectType: 'singletonStyleTag', | 72 | injectType: 'singletonStyleTag', |
73 | attributes: { | 73 | attributes: { |
74 | 'data-cke': true | 74 | 'data-cke': true |
75 | } | 75 | } |
76 | } | 76 | } |
77 | }, | 77 | }, |
78 | { | 78 | { |
79 | loader: 'css-loader' | 79 | loader: 'css-loader' |
80 | }, | 80 | }, |
81 | { | 81 | { |
82 | loader: 'postcss-loader', | 82 | loader: 'postcss-loader', |
83 | options: { | 83 | options: { |
84 | postcssOptions: styles.getPostCssConfig( { | 84 | postcssOptions: styles.getPostCssConfig( { |
85 | themeImporter: { | 85 | themeImporter: { |
86 | themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' ) | 86 | themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' ) |
87 | }, | 87 | }, |
88 | minify: true | 88 | minify: true |
89 | } ) | 89 | } ) |
90 | } | 90 | } |
91 | }, | 91 | }, |
92 | ] | 92 | ] |
93 | } | 93 | } |
94 | ] | 94 | ] |
95 | } | 95 | } |
96 | }; | 96 | }; |