|
@@ -237,22 +237,25 @@ module.exports = {
|
|
|
// Vue CLI would normally use its own loader to load .svg files. The icons used by
|
|
// Vue CLI would normally use its own loader to load .svg files. The icons used by
|
|
|
// CKEditor should be loaded using raw-loader instead.
|
|
// CKEditor should be loaded using raw-loader instead.
|
|
|
|
|
|
|
|
- // 1. First get default rule for .svg files.
|
|
|
|
|
|
|
+ // Get the default rule for *.svg files.
|
|
|
const svgRule = config.module.rule( 'svg' );
|
|
const svgRule = config.module.rule( 'svg' );
|
|
|
|
|
|
|
|
- // 2. then you can either:
|
|
|
|
|
- // a ) clear all loaders for existing 'svg' rule:
|
|
|
|
|
- // svgRule.uses.clear();
|
|
|
|
|
-
|
|
|
|
|
- // b) or exclude ckeditor directory from node_modules:
|
|
|
|
|
|
|
+ // Then you can either:
|
|
|
|
|
+ //
|
|
|
|
|
+ // * clear all loaders for existing 'svg' rule:
|
|
|
|
|
+ //
|
|
|
|
|
+ // svgRule.uses.clear();
|
|
|
|
|
+ //
|
|
|
|
|
+ // * or exclude ckeditor directory from node_modules:
|
|
|
svgRule.exclude.add( __dirname + '/node_modules/@ckeditor' );
|
|
svgRule.exclude.add( __dirname + '/node_modules/@ckeditor' );
|
|
|
|
|
|
|
|
- // 3. Add entry for CKEditor's only .svg files, by either:
|
|
|
|
|
-
|
|
|
|
|
- // a) by modifying existing 'svg' rule:
|
|
|
|
|
- // svgRule.use('raw-loader' ).loader( 'raw-loader' );
|
|
|
|
|
-
|
|
|
|
|
- // b) or by adding a new rule.
|
|
|
|
|
|
|
+ // Add an entry for *.svg files belonging to CKEditor. You can either:
|
|
|
|
|
+ //
|
|
|
|
|
+ // * modify the existing 'svg' rule:
|
|
|
|
|
+ //
|
|
|
|
|
+ // svgRule.use( 'raw-loader' ).loader( 'raw-loader' );
|
|
|
|
|
+ //
|
|
|
|
|
+ // * or add a new one:
|
|
|
config.module
|
|
config.module
|
|
|
.rule( 'cke-svg' )
|
|
.rule( 'cke-svg' )
|
|
|
.test( /ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/ )
|
|
.test( /ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/ )
|