@rws-framework/client
Version:
This package provides the core client-side framework for Realtime Web Suit (RWS), enabling modular, asynchronous web components, state management, and integration with backend services. It is located in `.dev/client`.
36 lines (34 loc) • 1.01 kB
JavaScript
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 }