Sha256: 306ff7b8d52952d5f56198c1f765e7f4a76952c73b2e06369224039c694cbac0
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
const webpack = require("webpack"); const config = require("./shared"); const CompressionPlugin = require("compression-webpack-plugin"); const sprocketsRailsManifestPlugin = require("./plugins/sprockets-rails-manifest.js"); const extractTextCssPlugin = require("./plugins/extract-text-css"); const extractTextSassLoader = require("./loaders/extract-text-sass"); config.output.filename = "[name]-[chunkhash].js"; config.plugins.unshift( extractTextCssPlugin ); config.plugins.unshift( new webpack.DefinePlugin({ "process.env": { NODE_ENV: JSON.stringify("production") } }) ); config.plugins = config.plugins.concat([ extractTextCssPlugin, new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false }, mangle: false }), new CompressionPlugin({ asset: "[path].gz[query]", algorithm: "gzip", test: /\.js$/, threshold: 10240, minRatio: 0.8 }), sprocketsRailsManifestPlugin ]); config.module.rules.push(extractTextSassLoader); module.exports = config;
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
webpack_on_rails-0.1.0 | lib/generators/webpack_on_rails/templates/client/config/production.js |