@@ -41,12 +41,16 @@ function resolveDepEntry(name) {
4141 *
4242 * This is opposed to using a webpack chunk splitting feature that will generate
4343 * the code that uses internal webpack module runtime that will not be handled
44- * by any other bundler. This custom code splitting is way less advanced, but
45- * works well for leaf node dependencies of the package.
44+ * by any other bundler (see TODO) . This custom code splitting is way less
45+ * advanced, but works well for leaf node dependencies of the package.
4646 *
47- * NB: This naive implementation works well only for leaf dependencies with a
48- * single export file. It can be updated to support multiple exports packages,
49- * but we can skip this for now
47+ * TODO(COMPASS-9445): This naive implementation works well only for leaf
48+ * dependencies with a single export file. A better approach would be to coerce
49+ * webpack to produce a require-able web bundle, which in theory should be
50+ * possible with a combination of `splitChunks`, `chunkFormat: 'commonjs'`, and
51+ * `target: 'web'`, but in practice produced bundle doesn't work due to webpack
52+ * runtime exports not being built correctly. We should investigate and try to
53+ * fix this to remove this custom chunk splitting logic.
5054 */
5155function createSiblingBundleFromLeafDeps (
5256 config ,
@@ -323,6 +327,7 @@ module.exports = (env, args) => {
323327 // shared dependencies possible
324328 const bundles = createSiblingBundleFromLeafDeps ( compassWebConfig , [
325329 '@mongodb-js/compass-components' ,
330+ 'ag-grid-community' ,
326331 'bson-transpilers' ,
327332 // bson is not that big, but is a shared dependency of compass-web,
328333 // compass-components and bson-transpilers, so splitting it out
0 commit comments