0

I am using IcedCoffeeScript. Some of my dependencies have a coffee-script dependency. When coffee-script is required it sets require.extensions['.coffee'] which overrides IcedCoffeeScript's extension.

This breaks my app.

I name all my files .coffee.

Is there a way to prevent require.extensions['.coffee'] being changed once set?

Or is there another solution to my problem.

PS. I don't really want to rename all my iced files to .iced, although this would work.

vaughan
  • 6,982
  • 6
  • 47
  • 63

1 Answers1

1

Fixed!

main.coffee

require 'iced-coffee-script'
Object.defineProperty require.extensions, '.coffee',  {writable: false}
vaughan
  • 6,982
  • 6
  • 47
  • 63