webpack-chunks.config.js 876 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* jshint browser: false, node: true, strict: true */
  6. const path = require( 'path' );
  7. const CKEditorWebpackPlugin = require( './ckeditor-webpack-plugin' );
  8. const webpack = require( 'webpack' );
  9. module.exports = {
  10. context: __dirname,
  11. target: 'web',
  12. entry: {
  13. core: './webpack-entry-point',
  14. pluginList: 'ckeditor5-list/src/list',
  15. pluginLink: 'ckeditor5-link/src/link',
  16. },
  17. output: {
  18. path: path.join( 'build', 'dist' ),
  19. filename: '[name].ckeditor.js',
  20. },
  21. devtool: 'cheap-source-map',
  22. plugins: [
  23. new CKEditorWebpackPlugin( {
  24. useMainPackageModules: true,
  25. mainPackagePath: process.cwd()
  26. } ),
  27. new webpack.optimize.CommonsChunkPlugin( {
  28. names: [ 'core' ],
  29. // children: true
  30. // minChunks: Infinity
  31. } )
  32. ],
  33. };