xp-forge / frontend

Web frontends
1 stars 1 forks source link

Add ability to bundle local files #20

Closed thekid closed 3 years ago

thekid commented 3 years ago

Inside package.json, local paths and files can be referenced by adding a reference to a directory as follows:

{
  "dependencies": {
    "jquery": "^3.6",
  },
  "bundles": {
    "vendor": {
      "jquery": "dist/jquery.min.js",
      "./src/main/js": "ckeditor.js"
    }
  }
}

(The . inside the directory path is resolved relative to the location of the package.json file).


One usecase are assets like the above custom-built CKEditor.

thekid commented 3 years ago

Released in https://github.com/xp-forge/frontend/releases/tag/v3.1.0