diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-08-30 16:38:49 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-09-02 09:33:21 +0200 |
commit | b400b05c3f005f0f4b8e7b989c609e90b7a556d9 (patch) | |
tree | e4f8f8c92f258db93350b660bddac9d0a2fb74f3 /server/sonar-web/config/webpack | |
parent | a5a4a49e0c8ded4740a0de91a31cf2c689a2f94c (diff) | |
download | sonarqube-b400b05c3f005f0f4b8e7b989c609e90b7a556d9.tar.gz sonarqube-b400b05c3f005f0f4b8e7b989c609e90b7a556d9.zip |
use webpack to build less
Diffstat (limited to 'server/sonar-web/config/webpack')
-rw-r--r-- | server/sonar-web/config/webpack/webpack.config.base.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/server/sonar-web/config/webpack/webpack.config.base.js b/server/sonar-web/config/webpack/webpack.config.base.js index 2e0dcc48236..e5ae5336916 100644 --- a/server/sonar-web/config/webpack/webpack.config.base.js +++ b/server/sonar-web/config/webpack/webpack.config.base.js @@ -2,6 +2,7 @@ var path = require('path'); var webpack = require('webpack'); var autoprefixer = require('autoprefixer'); +var ExtractTextPlugin = require('extract-text-webpack-plugin'); var autoprefixerOptions = require('./../autoprefixer'); var paths = require('./../paths'); @@ -59,7 +60,8 @@ module.exports = { filename: '[name].js' }, plugins: [ - new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.js') + new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.js'), + new ExtractTextPlugin('../../css/sonar.css', { allChunks: true }) ], resolve: { root: path.join(__dirname, '../../src/main/js') @@ -83,8 +85,12 @@ module.exports = { } }, { - test: /\.css/, - loader: 'style-loader!css-loader!postcss-loader' + test: /\.css$/, + loader: 'style!css!postcss' + }, + { + test: /\.less$/, + loader: ExtractTextPlugin.extract('style', 'css?-url!postcss!less') }, { test: require.resolve('jquery'), loader: 'expose?$!expose?jQuery' }, { test: require.resolve('underscore'), loader: 'expose?_' }, |