Esri / Esri/solution.js

Remove @license from all files other than the top-level index.ts

Open
#443 1 comment 0 reactions 0 assignees View on GitHub
A - enhancement
Dominant language
TypeScript
Stars
48
Forks
16
PR merge metrics
No merged PRs in 30d

Description

When building using webpack, the default behavior is to retain comments marked with `@license`.

However, since we have this in every single file, this results in the Esri license header being kept in the built output dozens and dozens of times, bloating the build output.

In Hub, we have overridden this behavior for now, but ideally we would simply remove the `@license` directive from all but the top level `index.ts` that exports all the functions. This would result in a build getting the Esri license... but just once for a package.

For reference, `arcgis-rest-js` simply has this in every file

```js
/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
* Apache-2.0 */
```

That comment is retained in the esm and commonjs build outputs, and the rollup config injects the following:

```js
/* @preserve
* @esri/arcgis-rest-portal - v2.15.0 - Apache-2.0
* Copyright (c) 2017-2020 Esri, Inc.
* Wed Aug 19 2020 11:59:01 GMT-0600 (Mountain Daylight Time)
*/
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.