Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7714799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:13:20+00:00 2026-06-01T02:13:20+00:00

According to the documentation here: https://github.com/playframework/Play20/wiki/AssetsGoogleClosureCompiler it says: Any JavaScript file present in app/assets

  • 0

According to the documentation here: https://github.com/playframework/Play20/wiki/AssetsGoogleClosureCompiler it says:

Any JavaScript file present in app/assets will be parsed by Google Closure compiler, checked for errors and dependencies and minified if activated in the build configuration.

However I can’t find out how to set this in the build configuration, I tried adding the code:

val main = PlayProject(appName, appVersion, mainLang = SCALA).settings(
    javascriptEntryPoints <<= baseDirectory(base =>
        base / "app" / "assets" / "javascripts" ** "*.js"
    )
)

in build.scala however I can’t find any minified JavaScript files.

Here are the steps I’ve tried:

  1. Add the above code in build.scala

  2. Create a JavaScript file in app/assets/javascripts

  3. Type “compile” in the Play console and notice that no minified JavaScript files are produced in app/assets/javascripts or public/javascripts

However, I have noticed that if I write some invalid JavaScript, I’ll get an error message (e.g. on 127.0.0.1:9000 – Compilation error) so it looks like closure compiler is checking for errors successfully, however I’m not sure how to do the minification.

While on the subject of minification, is it possible to use the regular (non-minified) JavaScript file only in development mode, but in production, use the minified version?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:13:21+00:00Added an answer on June 1, 2026 at 2:13 am

    Play does not put the assets into public or the assets folder after they have been compiled. The compiled assets (JS, Less or CoffeeScript) get placed inside:

    /target/scala[version]/resource_managed/main/…

    Play will then create a mapping to these files so that you can treat the assets as if they did live in the /public folder.

    One thing to note is that during development mode compile will not output the files into this directory. When you hit your localhost:9000 path with the browser, this will do the final compile and then output the files to the directory.

    To answer the minified version (and to see a better example of how to change the build config), I recommend checking out Yann Simon’s post on using Less in Play. It’s conceptually the same process as JS and he also has a great example on how to switch between un-minified/minified versions based on the Play mode:

    https://plus.google.com/u/0/108788785914419775677/posts/QgyUF9cXPkv

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the blueimp jQuery file upload plug-in located here https://github.com/blueimp/jQuery-File-Upload and according
I am trying to use the jQuery CSV plugin, as documented here: http://code.google.com/p/js-tables/wiki/CSV According
According to the documentation located here: http://archive.plugins.jquery.com/project/query-object In order to customize $.query 's parameters
According to the documentation for getResultSet in java.sql.Statement , it says: Retrieves the current
I am trying to use the Qt new functions described here: http://opencv.willowgarage.com/documentation/cpp/qt_new_functions.html#cv-createbutton And I
So according to Sun's J2EE documentation ( http://docs.sun.com/app/docs/doc/819-3669/bnani?l=en&a=view ), If a tag attribute is
According to the documentation here (under unique results) and here , A JDO default
According to the NHibernate Validator documentation here: http://nhforge.org/wikis/validator/nhibernate-validator-1-0-0-documentation.aspx I should be able to pass
http://babymoments.co/preview/highres%20preview/5_357/ According to the FPDF documentation here: http://www.fpdf.org/en/doc/image.htm You are supposed to be able
According to this documentation, http://jqueryui.com/demos/datepicker/#option-altFormat I can set a different date format for the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.