How to minifiy webpack codes in Rails 6

shj5508·2020년 1월 25일
0

rails6 Lecture Note

목록 보기
1/1

First install uglifyjs-webpack-plugin with yarn

yarn add uglifyjs-webpack-plugin

Then add these line in webpack configeriation file

// config/webpack/production.js
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')

environment.config.set('optimization.minimizer', [new UglifyJsPlugin()])

It's done!


Reference

profile
Rails, MongoDB 강좌를 운영하고 있습니다

0개의 댓글