E
E
endenwer2016-01-15 23:31:42
JavaScript
endenwer, 2016-01-15 23:31:42

Is there a size limit for javascript files in Rails?

Faced the problem that Rails does not want to work with large javascript files in a test environment. By large, I mean about 100 thousand lines. In development mode, everything works fine, but all tests fail if you include libraries that are too large. I used Browserify to include NPM modules. The resulting file has been retrieved in application.js. It turned out to be about 112 thousand lines. At the same time, the tests do not show the libraries that it contains. If you delete several libraries and make the file smaller, then the remaining libraries are visible. So I think it's all the same in the file size. Has anyone encountered such a problem? How can it be solved?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vsuhachev, 2016-01-17
@endenwer

Include your file directly in html via a separate script tag

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question