From 79bcb9a9e0a56eb23455f806d4c70a4062f347f7 Mon Sep 17 00:00:00 2001 From: Aleksander Nowodzinski Date: Mon, 20 Nov 2017 15:55:54 +0100 Subject: [PATCH 1/2] Updated webpack configuration to enable PostCSS and themes. --- package.json | 5 ++--- webpack.config.js | 18 +++++++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 70fa8351..5c924a12 100644 --- a/package.json +++ b/package.json @@ -28,12 +28,11 @@ "@ckeditor/ckeditor5-link": "^1.0.0-alpha.2", "@ckeditor/ckeditor5-list": "^1.0.0-alpha.2", "@ckeditor/ckeditor5-paragraph": "^1.0.0-alpha.2", + "@ckeditor/ckeditor5-theme-lark": "^1.0.0-alpha.2", "@ckeditor/ckeditor5-upload": "^1.0.0-alpha.2", "babel-minify-webpack-plugin": "^0.2.0", - "css-loader": "^0.28.7", - "node-sass": "^4.5.3", + "postcss-loader": "^2.0.8", "raw-loader": "^0.5.1", - "sass-loader": "^6.0.6", "style-loader": "^0.18.2", "webpack": "^3.6.0", "webpack-sources": "1.0.1" diff --git a/webpack.config.js b/webpack.config.js index 83bddd7b..011814b4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -10,6 +10,7 @@ const path = require( 'path' ); const webpack = require( 'webpack' ); const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' ); +const { getPostCssConfig } = require( '@ckeditor/ckeditor5-dev-utils' ).styles; const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' ); const BabiliPlugin = require( 'babel-minify-webpack-plugin' ); const buildConfig = require( './build-config' ); @@ -48,16 +49,23 @@ module.exports = { use: [ 'raw-loader' ] }, { - test: /\.scss$/, + test: /\.css$/, use: [ - 'style-loader', { - loader: 'css-loader', + loader: 'style-loader', options: { - minimize: true + singleton: true } }, - 'sass-loader' + { + loader: 'postcss-loader', + options: getPostCssConfig( { + themeimporter: { + themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' ) + }, + minify: true + } ) + }, ] } ] From 1257fe5e11b7b515f504526b340d52a4e083ac8d Mon Sep 17 00:00:00 2001 From: Aleksander Nowodzinski Date: Thu, 30 Nov 2017 11:13:08 +0100 Subject: [PATCH 2/2] Renamed getPostCssConfig option themeimporter->themeImporter. --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 011814b4..37fc8bb3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -60,7 +60,7 @@ module.exports = { { loader: 'postcss-loader', options: getPostCssConfig( { - themeimporter: { + themeImporter: { themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' ) }, minify: true