UNPKG

@rws-framework/client

Version:

Realtime Web Suit is a web-component powered, MS FAST powered fullstack-oriented framework that you can use to create domain-agnostic modular asynchoronous components with intershared authorized states.

36 lines (34 loc) 1.01 kB
const TerserPlugin = require('terser-webpack-plugin'); const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); function getRWSProductionSetup(optimConfig){ return { ...optimConfig, minimize: true, minimizer: [ new TerserPlugin({ parallel: true, extractComments: false, terserOptions: { keep_classnames: true, // Prevent mangling of class names mangle: false, //@error breaks FAST view stuff if enabled for all assets compress: { dead_code: true, pure_funcs: ['console.log', 'console.info', 'console.warn'] }, format: { comments: false, beautify: false } } }), new CssMinimizerPlugin({ minimizerOptions: { preset: ['default', { discardComments: { removeAll: false }, }], }, }) ] }; } module.exports = { getRWSProductionSetup }