Skip to content

Commit 694e399

Browse files
authored
chore: improve bundle size (#4011)
1 parent 5230cd3 commit 694e399

File tree

146 files changed

+177
-160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+177
-160
lines changed

.babel-preset.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const browsers = [
1616
]
1717

1818
const plugins = [
19-
'@babel/plugin-proposal-class-properties',
19+
['@babel/plugin-proposal-class-properties', { loose: true }],
2020
'@babel/plugin-proposal-export-default-from',
2121
'@babel/plugin-proposal-export-namespace-from',
2222
'@babel/plugin-syntax-dynamic-import',
@@ -58,6 +58,7 @@ module.exports = () => ({
5858
'@babel/env',
5959
{
6060
modules: isESBuild || isUMDBuild ? false : 'commonjs',
61+
loose: true,
6162
targets: { browsers },
6263
},
6364
],

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions

bundle-size/bundle.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@ process.env.NODE_ENV = 'build-es'
2323
const makeWebpackConfig = (entry) => ({
2424
devtool: false,
2525
mode: 'production',
26-
name: 'client',
2726
target: 'web',
2827

2928
entry,
3029
output: {
3130
filename: path.basename(entry),
3231
path: config.paths.base('bundle-size', 'dist'),
32+
33+
...(argv.debug && {
34+
pathinfo: true,
35+
}),
3336
},
3437

3538
module: {

docs/src/components/ComponentDoc/ComponentExample/ComponentExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import cx from 'classnames'
1+
import cx from 'clsx'
22
import copyToClipboard from 'copy-to-clipboard'
33
import PropTypes from 'prop-types'
44
import React, { Component } from 'react'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"@semantic-ui-react/event-stack": "^3.1.0",
7777
"@stardust-ui/react-component-event-listener": "~0.38.0",
7878
"@stardust-ui/react-component-ref": "~0.38.0",
79-
"classnames": "^2.2.6",
79+
"clsx": "^1.1.1",
8080
"keyboard-key": "^1.1.0",
8181
"lodash": "^4.17.19",
8282
"prop-types": "^15.7.2",

src/collections/Breadcrumb/Breadcrumb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import cx from 'classnames'
1+
import cx from 'clsx'
22
import _ from 'lodash'
33
import PropTypes from 'prop-types'
44
import React from 'react'

src/collections/Breadcrumb/BreadcrumbDivider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import cx from 'classnames'
1+
import cx from 'clsx'
22
import _ from 'lodash'
33
import PropTypes from 'prop-types'
44
import React from 'react'

src/collections/Breadcrumb/BreadcrumbSection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import cx from 'classnames'
1+
import cx from 'clsx'
22
import _ from 'lodash'
33
import PropTypes from 'prop-types'
44
import React, { Component } from 'react'

src/collections/Form/Form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import cx from 'classnames'
1+
import cx from 'clsx'
22
import _ from 'lodash'
33
import PropTypes from 'prop-types'
44
import React, { Component } from 'react'

src/collections/Form/FormField.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import cx from 'classnames'
1+
import cx from 'clsx'
22
import _ from 'lodash'
33
import PropTypes from 'prop-types'
44
import React, { createElement } from 'react'

0 commit comments

Comments
 (0)