Meteor uses separate CSS and JS files on the development server and combines and minifies them on the production server. Is there a way to force it to combine and minify all JS/CSS on the development server (localhost), at least to check if the combined file works fine before deploying? Thanks.
Asked
Active
Viewed 2,593 times
2 Answers
19
> meteor run --production
meteor run
now has a production
flag:
Usage: meteor run [options]
Options:
--port, -p Port to listen on. NOTE: Also uses port N+1 and N+2. [default: 3000]
--production Run in production mode. Minify and bundle CSS and JS files. [boolean]

Kyle Finley
- 11,842
- 6
- 43
- 64
-
Impressive. The quality of the minification is impressive. – Vadorequest Jul 20 '14 at 22:01
0
Presently, no. You can meteor deploy --debug
to leave the files unminified in production, but there is no 'combine but don't minify' command within meteor at this time.
Per the docs:
You can deploy in debug mode by passing --debug. This will leave your source code readable by your favorite in-browser debugger, just like it is in local development mode.
If you simply want to combine multiple javascript files into one, here are some ideas.
-
Thanks. Sorry, my question wasn't precise enough. I want to combine *and* minify. What I mean is that I want to be able to test the production behavior locally, with all the files minified/combined as if it had been the case on the production server. There's got to be a special flag that is passed when meteor deploy is called that tells meteor: "hey, you are in production mode". – sebastien.b Feb 04 '13 at 02:37