Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jf-backend-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
stan.gao
jf-backend-template
Commits
c54180e0
Commit
c54180e0
authored
May 29, 2019
by
jason.xing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【增加】添加webpack对ckeditor5 多语言的支持
parent
a09fee46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
config-overrides.js
config-overrides.js
+25
-0
No files found.
config-overrides.js
View file @
c54180e0
const
{
override
,
fixBabelImports
,
getBabelLoader
,
addDecoratorsLegacy
,
disableEsLint
}
=
require
(
'customize-cra'
);
const
{
styles
}
=
require
(
'@ckeditor/ckeditor5-dev-utils'
);
const
CKEditorWebpackPlugin
=
require
(
'@ckeditor/ckeditor5-dev-webpack-plugin'
);
const
CKEditorPlugin
=
new
CKEditorWebpackPlugin
(
{
// Main language that will be built into the main bundle.
language
:
'zh-cn'
,
// Additional languages that will be emitted to the `outputDirectory`.
// This option can be set to an array of language codes or `'all'` to build all found languages.
// The bundle is optimized for one language when this option is omitted.
// additionalLanguages: 'all',
// Optional directory for emitted translations. Relative to the webpack's output.
// Defaults to `'translations'`.
// outputDirectory: 'ckeditor5-translations',
// Whether the build process should fail if an error occurs.
// Defaults to `false`.
// strict: true,
// Whether to log all warnings to the console.
// Defaults to `false`.
// verbose: true
}
)
const
fileLoaderMatcher
=
function
(
rule
)
{
return
rule
.
loader
&&
rule
.
loader
.
indexOf
(
`file-loader`
)
!==
-
1
;
...
...
@@ -99,6 +122,8 @@ function addPlugin(config) {
l
.
exclude
=
reg
;
}
config
.
plugins
.
push
(
CKEditorPlugin
);
return
config
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment