Ben
Ben

Reputation: 2465

How to optimize project with Require.js to produce only ONE Javascript file?

I managed to use require.js and it's optimizer to optimize my project. But it generates 3 javascript files:

1. main file

The require.js config file (the one referenced in html as data-main )

2. require.js library

The code for require.js.

3. My application code

Is it possible to merge these 3 javascript files into one single file?

Upvotes: 3

Views: 1301

Answers (1)

JAR.JAR.beans
JAR.JAR.beans

Reputation: 10004

Take a look at the grunt js project, with specific to :

   grunt concat

and the plugin for require js:

https://github.com/asciidisco/grunt-requirejs

Upvotes: 2

Related Questions