(config)
| 19 | let minify; |
| 20 | |
| 21 | function 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 | |
| 37 | function addCopyPluginForThemeCss(config) { |
| 38 | const options = minify |
no test coverage detected