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

  • SEARCH
  • Home
  • 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 7814305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:09:23+00:00 2026-06-02T05:09:23+00:00

I have been battling with this for a while (even used some Ant-based workarounds),

  • 0

I have been battling with this for a while (even used some Ant-based workarounds), even posted a question that went unanswered: older similar/related question.

Require.js allows to build several modules using the same profile/config file. For example:

({
    appDir: 'some/path',
    baseUrl: 'some/base/path',
    dir: 'some/other/path',
    optimize: 'none',
    paths: {
        ...
    },

    modules: [
    {
        name: 'someModule',
    },
    {
        name: 'someOtherModule'
    }]
})

Which works fairly well. Additionally, Require.js provides an option to override any option for the build for a specific module: Require/js example build configuration, like this :

({
    appDir: 'some/path',
    baseUrl: 'some/base/path',
    dir: 'some/other/path',
    optimize: 'none',
    paths: {
        ...
    },

    modules: [
    {
        name: 'someModule',
    },
    {
        name: 'someModule',
        override : {
            optimize: 'uglify'
        }
    }]
})

or so I understood it. The purpose is to use the same build configuration file on the same application, but have it both non-minified and minified. This doesn’t work.

EDIT
The error I am getting is (cleaned up, since it is part of a larger Ant build):

Error: ENOENT, no such file or directory 'some/other/path/someModule.js-temp'

Any help, suggestions (on both questions) are greatly appreciated.

  • 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-02T05:09:24+00:00Added an answer on June 2, 2026 at 5:09 am

    The listing of modules: config does not allow duplicates for the name value. I suspect that is the source of the problem. It is an array just to allow proper sequencing of build layers that may be excluded in other build layers — using an object hash would not work since key iteration on an object does not guarantee order.

    If you want to do a build that has the layer in non-minified and minified format, I suggest driving the build via a node script, then manually requiring uglify and doing a copy of the built file and minification of that copy after the build.

    Here is an example of a node script that drives the build:
    https://github.com/jrburke/r.js/blob/master/build/tests/tools/override/override.js

    That one is replacing the version of uglify used, but you could use it and do the file copy/manual minification in the callback function passed to requirejs.optimize().

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

Sidebar

Related Questions

So I have been battling with this for some time and I need your
I have been tasked with refactoring some components that used xmlbeans to now make
I've been battling this one for a while now. I have a stored proc
I have been battling with this for a while, so any help would be
I have been battling with this code for quite a while and just don't
Hey I have been battling with this problem for a while now. Perhaps there
maybe someone could shed some light on the statement that I have been battling
So I have been trying and battling with this for a few hours now.
Have been working on this question for a couple hours and have come close
I've been battling with this issue for a couple of days now. I have

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.