seagull-js / seagull

the core of the seagull framework
https://seagull-js.github.io/seagull/
GNU Lesser General Public License v3.0
10 stars 5 forks source link

bundler-lodash-sub-file-import #125

Closed cpa-gecko closed 5 years ago

cpa-gecko commented 5 years ago

The web root for static files contains a vendor.js file, which bundles global dependencies for pages. The seagull default global dependencies can be altered by adding a new entry to the package.json of the seagull project:

{
  ...,
  "seagull": {
    ...,
    "vendorBundleIncludes": {
      "add": [
        "someGlobalDependency",
        "somesubDependency/forExample",
        "lodash/isEqual"
      ],
      "remove": [
        "somethingThatShouldBeInAllPages"
      ]
    }
  }  
}

A relevant case is the inclusion of sub-files of dependencies, like specific lodash functions via the following syntax:

include isEqual from 'lodash/isEqual'

These are not included by the default seagull global vendor dependencies.

codeclimate[bot] commented 5 years ago

Code Climate has analyzed commit 268b86d9 and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 4

View more on Code Climate.