Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Commit 22c0a63

Browse files
authored
Merge pull request #3 from ckeditor/t/ckeditor5-ui/144
Other: Changed the webpack configuration so the styles are processed using PostCSS instead of SASS (see ckeditor/ckeditor5-ui#144).
2 parents 6ab5d5f + 73672ed commit 22c0a63

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@
2828
"@ckeditor/ckeditor5-link": "^1.0.0-alpha.2",
2929
"@ckeditor/ckeditor5-list": "^1.0.0-alpha.2",
3030
"@ckeditor/ckeditor5-paragraph": "^1.0.0-alpha.2",
31+
"@ckeditor/ckeditor5-theme-lark": "^1.0.0-alpha.2",
3132
"@ckeditor/ckeditor5-upload": "^1.0.0-alpha.2",
3233
"babel-minify-webpack-plugin": "^0.2.0",
33-
"css-loader": "^0.28.7",
34-
"node-sass": "^4.5.3",
34+
"postcss-loader": "^2.0.8",
3535
"raw-loader": "^0.5.1",
36-
"sass-loader": "^6.0.6",
3736
"style-loader": "^0.18.2",
3837
"webpack": "^3.6.0",
3938
"webpack-sources": "1.0.1"

webpack.config.js

+13-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
const path = require( 'path' );
1111
const webpack = require( 'webpack' );
1212
const { bundler } = require( '@ckeditor/ckeditor5-dev-utils' );
13+
const { getPostCssConfig } = require( '@ckeditor/ckeditor5-dev-utils' ).styles;
1314
const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' );
1415
const BabiliPlugin = require( 'babel-minify-webpack-plugin' );
1516
const buildConfig = require( './build-config' );
@@ -49,16 +50,23 @@ module.exports = {
4950
use: [ 'raw-loader' ]
5051
},
5152
{
52-
test: /\.scss$/,
53+
test: /\.css$/,
5354
use: [
54-
'style-loader',
5555
{
56-
loader: 'css-loader',
56+
loader: 'style-loader',
5757
options: {
58-
minimize: true
58+
singleton: true
5959
}
6060
},
61-
'sass-loader'
61+
{
62+
loader: 'postcss-loader',
63+
options: getPostCssConfig( {
64+
themeImporter: {
65+
themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' )
66+
},
67+
minify: true
68+
} )
69+
},
6270
]
6371
}
6472
]

0 commit comments

Comments
 (0)