機械翻訳について

パッケージング・ジョブからJavaScriptライブラリを除外する方法

アプリケーションまたは拡張の構築時に、バンドルにJavaScriptライブラリを含めようとすると、パッケージ・ジョブが失敗することがあります。

この問題を解決するには、vb-require-bundle Gruntタスクを構成して、ライブラリをバンドルから除外します。 たとえば、exceljs.min JavaScriptライブラリを除外するGruntファイルは次のようになります:

'use strict';

/**
 * Visual Builder application build script.
 * For details about the application build and Visual Builder-specific grunt tasks
 * provided by the grunt-vb-build npm dependency, please refer to
 * https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/app-builder-cloud&id=visual-application-build
 */
module.exports = (grunt) => {
    require('load-grunt-tasks')(grunt);

    grunt.config('vb-require-bundle', {
        "options": {
            "emptyPaths": ["xlsx"],
            "bundles": {
                "vb-app-bundle": {
                    "modules": {
                        "find": [
                            ".*(\\.(js|json|html|css))$",
                            "!resources/js/exceljs",
                        ]
                    }
                }
            }
        }
    });

};