Skip to content

Commit c59fcce

Browse files
committed
fix(components): always force speedy mode for emotion to avoid performance issues in dev mode
1 parent ac9a6d7 commit c59fcce

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import { sheet } from '@leafygreen-ui/emotion';
2+
sheet.speedy(true);

packages/compass-components/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import './force-emotion-speedy';
12
export * from './components/leafygreen';
2-
33
export {
44
default as emotion,
55
flush,

packages/compass-web/webpack.config.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,6 @@ module.exports = (env, args) => {
294294
tls: 'commonjs2 tls',
295295
},
296296
plugins: [
297-
// Always package dist with NODE_ENV set to production, otherwise @emotion
298-
// dev mode behavior completely hangs code in the browser when applying
299-
// dev build to locally running mms
300-
new webpack.DefinePlugin({
301-
'process.env.NODE_ENV': JSON.stringify('production'),
302-
}),
303-
304297
// Only applied when running webpack in --watch mode. In this mode we want
305298
// to constantly rebuild d.ts files when source changes, we also don't
306299
// want to fail and stop compilation if we failed to generate definitions

0 commit comments

Comments
 (0)