Ember uglify breaks rainbow.js

44 views Asked by At

I am trying to add rainbow code samples to my ember project. I installed rainbow through bower and it works locally. However when I build and deploy to staging I am getting JS console errors.

source error

As far as I can tell this is the minified version of this. It appears to me that for some reason the Prism class is not being included when it is minified. I am importing

    'rainbow/dist/rainbow.min.js',
    'rainbow/src/language/generic.js',
    'rainbow/src/language/r.js',
    'rainbow/src/language/python.js',
    'rainbow/src/language/json.js',
    'rainbow/src/language/html.js'

in my ember-cli-build.js using

bowerDependencies.forEach(function(path) { app.import(app.bowerDirectory + '/' + path); });.

If I build with minify off it works wonderfully, but I would like to minify the JS. I am currently at a loss of why these files are not being included.

1

There are 1 answers

2
Ember Freak On

Use ./rainbow/dist/rainbow.min.js for al the file inclusion.

Refer : https://github.com/ember-cli/ember-cli/issues/6829