Arthur Bogaart pushed to branch feature/webpack at cms-community / hippo-addon-channel-manager
Commits: d6f2deab by Arthur Bogaart at 2016-09-16T11:15:53+02:00 CHANNELMGR-863 Add exclude-from-vendors conf - - - - - 2 changed files: - frontend-ng/conf/gulp.conf.js - frontend-ng/conf/webpack-dist.conf.js Changes: ===================================== frontend-ng/conf/gulp.conf.js ===================================== --- a/frontend-ng/conf/gulp.conf.js +++ b/frontend-ng/conf/gulp.conf.js @@ -10,6 +10,7 @@ const path = require('path'); const gutil = require('gulp-util'); +const pkg = require('../package.json'); exports.ngModule = 'app'; @@ -24,6 +25,15 @@ exports.paths = { tasks: 'gulp_tasks', }; +exports.exclude = { + vendors: [ + 'open-sans-fontface', + ], +}; + +exports.vendors = Object.keys(pkg.dependencies) + .filter(name => exports.exclude.vendors.indexOf(name) === -1); + exports.path = {}; for (const pathName in exports.paths) { if (exports.paths.hasOwnProperty(pathName)) { ===================================== frontend-ng/conf/webpack-dist.conf.js ===================================== --- a/frontend-ng/conf/webpack-dist.conf.js +++ b/frontend-ng/conf/webpack-dist.conf.js @@ -4,7 +4,7 @@ const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); -const pkg = require('../package.json'); + const autoprefixer = require('autoprefixer'); module.exports = { @@ -16,7 +16,6 @@ module.exports = { loader: 'eslint', }, ], - loaders: [ { test: /.json$/, @@ -25,7 +24,7 @@ module.exports = { ], }, { - test: /\.(css|scss)$/, + test: /\.scss$/, loaders: ExtractTextPlugin.extract({ fallbackLoader: 'style', loader: 'css?minimize!postcss!sass', @@ -61,7 +60,7 @@ module.exports = { new webpack.optimize.UglifyJsPlugin({ compress: { unused: true, dead_code: true }, }), - new ExtractTextPlugin('index-[contenthash].css'), + new ExtractTextPlugin('[name]-[contenthash].css'), ], postcss: [ autoprefixer({ @@ -81,7 +80,7 @@ module.exports = { debug: true, devtool: 'cheap-module-eval-source-map', entry: { - vendor: Object.keys(pkg.dependencies), + vendor: conf.vendors, app: `./${conf.path.src('index')}`, }, }; View it on GitLab: https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/d6f2deabf6cf18f46bad74d926e4828128b81f04
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn