Skip to content

Commit 181aad6

Browse files
fix(app-admin-ui): improve browser bundling (#42)
1 parent bd6ada3 commit 181aad6

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

packages/app-admin-ui/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,15 @@ class AdminUIApp {
9999
compilers.map(
100100
compiler =>
101101
new Promise((resolve, reject) => {
102-
compiler.run(err => {
102+
compiler.run((err, stats) => {
103103
if (err) {
104104
reject(err);
105+
} else if (stats && stats.hasErrors()) {
106+
return reject(
107+
new Error(
108+
stats.toString({ all: false, errors: true, warnings: true, colors: true })
109+
)
110+
);
105111
} else {
106112
resolve();
107113
}

packages/app-admin-ui/server/getWebpackConfig.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ module.exports = function ({ adminMeta, adminViews, entry, outputPath }) {
9898
// we also want @apollo/client to always resolve to the same version of @apollo/client
9999
'@apollo/client$': path.dirname(require.resolve('@apollo/client/package.json')),
100100
},
101+
fallback: { crypto: false },
101102
},
102103
};
103104
};

0 commit comments

Comments
 (0)