MCPcopy
hub / github.com/nhn/tui.editor / addFileManagerPlugin

Function addFileManagerPlugin

apps/editor/webpack.config.js:21–35  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

19let minify;
20
21function addFileManagerPlugin(config) {
22 // When an entry option's value is set to a CSS file,
23 // empty JavaScript files are created. (e.g. toastui-editor-only.js)
24 // These files are unnecessary, so use the FileManager plugin to delete them.
25 const options = minify
26 ? {
27 delete: ['./dist/cdn/toastui-editor-only.min.js'],
28 }
29 : {
30 delete: ['./dist/toastui-editor-only.js'],
31 copy: [{ source: './dist/*.{js,css}', destination: './dist/cdn' }],
32 };
33
34 config.plugins.push(new FileManagerPlugin({ events: { onEnd: options } }));
35}
36
37function addCopyPluginForThemeCss(config) {
38 const options = minify

Callers 1

setProductionConfigFunction · 0.85

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected