2

Does anyone know a way to disable the digest/hash of connect-assets/mincer? I know it's bla bla important in their opinion but it's not as useful when developing

Stefan
  • 3,962
  • 4
  • 34
  • 39
  • Do you mind explaining why you’re in need of them turned off? There is no option to turn them off so you don’t shoot yourself in the foot when moving to production settings. :) – Andrew Dunkman Jan 06 '15 at 00:40
  • it is horrible to debug with them on. If you set any breakpoint / have any file open in dev tools and you change the file and refresh everything gets cleared. it makes development harder and they have no use since in production you serve a single bundle anyway, so the bundle could easily have the hash but in dev mode chrome cache disable does the job just fine – Stefan Jan 06 '15 at 01:04

1 Answers1

1

The digest or fingerprinting can be disabled this way:

app.use(assets({
  paths: [
    'assets/css',
    'assets/fonts',
    'assets/js',
    'assets/images',
    'bower_components'
  ],
  fingerprinting: false
}));

Now when you deploy your app, you will see the assets have no digest/hash appended to the names.

kgpdeveloper
  • 2,099
  • 4
  • 25
  • 34