0

I am new to MEAN & Grunt. I used "ng build --prod --aot" for production of my MEAN stack app and now i have these files in my

dist folder

  1. inline.2b13c4abf73bfbc8e0d1.bundle.js
  2. main.907b8423747dc933c849.bundle.js
  3. polyfills.477545a8be21bde7f43e.bundle.js
  4. vendor.61844e8ff3b3b4fa4491.bundle.js

I am trying to minify these files as these can still be reduced and 30kb size can be saved .

I used grunt with these src and dest :

uglify: {
         files: {
                src: 'dist/*.js',
                dest: 'dist/',
                expand: true,
                flatten: true,
                ext: '.js'
            }

}

On "grunt uglify" command I get the files

  1. inline.js
  2. main.js
  3. polyfills.js
  4. vendor.js

How can I get the same file name that angular build provided me ? And please provide options that can maximize reduction in size(optional) Thanks in advance !

1 Answer 1

1

adding extDot worked for me ,

files: {
                src: 'dist/*.js',
                dest: 'dist/',
                expand: true,
                flatten: true,
                ext: '.js',
                extDot: 'last'
            }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.