ExtJS Package Classic Resources Missing

631 Views Asked by At

I have an ExtJS package with the following structure:

Package
  classic
    resrouces
      file.json

When I build the app with the package in production mode, the file.json is missing.

How can I get the build to include the resources from classic directory (within a package)?

EDIT

Adding the following to package.json enables copying files from both toolkit specific and shared resources directory.

        "resource": {
            "paths": [
                "${package.dir}/resources",
                "${package.dir}/${toolkit.name}/resources"
            ]
        },

However, all the files (from classic/resources/ and resources/) are copied to the same directory (build/production/AppName/classic/resources/PackageName/) and if same filename exists in both directories, one file overwrites the other in the build directory.

build/production/AppName/classic/resources/PackageName/some_resource_file.json

How can they be separated so both files exists in the build?

1

There are 1 best solutions below

2
On

In your main project folder, you have the file app.json, where you can define which directories should be copied when building the project and a rule for skipping some of them:

{
    "production": {
        "output": {
            "resources": "resources",
             // ...
         },
    },
    "resources": [{
        "path": "resources", // in your case classic/resources
        "output": "shared"
    }],
    /**
     * File / directory name pattern to ignore when copying to the builds. Must be a
     * valid regular expression.
     */
    "ignore": [
        "(^|/)CVS(/?$|/.*?$)"
    ]
}