質問

I am trying to specify compilation for two files in the build.js file for RequireJS optimizer. But only the last file gets optimized. Here's the build.js file:

({
    baseUrl: "..",
    name: "client/TestA",
    out: "full.js",
    findNestedDependencies: true
},{
    baseUrl: "..",
    name: "client/TestB",
    out: "fullB.js",
    findNestedDependencies: true
})

In this case only the last entry client/TestB is getting built. I need the require Optimizer to build both.

役に立ちましたか?

解決

Where did you found this format of build.js file? Maybe you need something like modules field?

It should be something like this:

({

    baseUrl: "..",
    dir : './out' // required when using modules, instead 'out' field
    modules: [
        {
            name: "client/TestA"
        },
        {
            name: "client/TestB"
        }
    ],
    findNestedDependencies: true
});
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top