Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #55085
    Mahdi
    Participant

    Hello,

    I was wondering if there is an easy way to make the output JS file minified?
    So far I have tried the following minify plugin but it seems I am missing something!

    https://github.com/webpack-contrib/babel-minify-webpack-plugin

    #55102
    Zac Gordon
    Keymaster

    Hi!

    Is the webpack setup included in the example plugin not giving you minified files when you run npm run build?

    #55112
    Mahdi
    Participant

    Actually, I am using the “Gutenberg Course” config here but running npm run build isn’t giving me the minified version as expected!

    #55209
    Zac Gordon
    Keymaster

    Just updated the npm script to minify in production. Just needed -p at the end 🙂

    
    "build": "cross-env BABEL_ENV=default NODE_ENV=production webpack -p"
    
    #55217
    Mahdi
    Participant

    Thanks for your time and help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.