@adaptabletools/adaptable-angular-aggrid 23.0.10 → 23.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/index.css +164 -341
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,6 +8,39 @@ AdapTable provides a huge range of Data Grid (and FDC3) features, which extend A
|
|
|
8
8
|
|
|
9
9
|
For full details on how to install, instantiate and reference AdapTable programmatically at run-time please read the [AdapTable Angular Documentation](https://www.adaptabletools.com/docs/angular-overview).
|
|
10
10
|
|
|
11
|
+
## CommonJS Build Warnings
|
|
12
|
+
|
|
13
|
+
When building an Angular application which uses AdapTable, you may see warnings like:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
[WARNING] Module 'react' used by 'node_modules/@adaptabletools/adaptable/...' is not ESM
|
|
17
|
+
CommonJS or AMD dependencies can cause optimization bailouts.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
These warnings are emitted by all Angular builders — both the esbuild-based ones (`@angular/build:application`, `@angular-devkit/build-angular:browser-esbuild`) and the older webpack-based one (`@angular-devkit/build-angular:browser`, where the message reads `'...' depends on 'react'` instead).
|
|
21
|
+
|
|
22
|
+
These warnings refer to React ecosystem packages used internally by AdapTable (`react`, `react-dom`, and the transitive dependency `use-sync-external-store`). These packages are published as CommonJS only — no ESM distribution exists — so the warnings cannot be avoided at the package level. They are harmless: the build output is correct, and the "optimization bailout" only means the bundler cannot tree-shake inside those specific modules (which would have no effect on React's monolithic runtime anyway).
|
|
23
|
+
|
|
24
|
+
To silence the warnings, add the packages to the [`allowedCommonJsDependencies`](https://angular.dev/tools/cli/build#configuring-commonjs-dependencies) build option — in `angular.json`, or in `project.json` if you are using an Nx monorepo:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"targets": {
|
|
29
|
+
"build": {
|
|
30
|
+
"executor": "@angular/build:application",
|
|
31
|
+
"options": {
|
|
32
|
+
"allowedCommonJsDependencies": [
|
|
33
|
+
"react",
|
|
34
|
+
"react-dom",
|
|
35
|
+
"use-sync-external-store"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Listing a package name also covers its deep imports (e.g. `react/jsx-runtime`, `react-dom/client`, `use-sync-external-store/shim`), so these three entries are sufficient.
|
|
11
44
|
|
|
12
45
|
## Demos
|
|
13
46
|
|