Comments (4)
Hi @sohara, thanks for adding an issue. This is the right place for it. We're aware of this pain point and we're working on a better solution so that it is less expensive to use a single component from the library.
We'll keep you updated when there's something to announce.
from forma-36.
Hi @dmitri-suvorov-sumup Thank you for the detailed comment.
We did investigate the problem with Parcel. See Parcel #4046
The issue should be resolved in Parcel 2 which is in beta release at the moment. I believe we will migrate as soon as Parcel 2 have their first stable version release.
from forma-36.
I'm having the same issue when building an entry extension. The size of forma-36-react-components
has increased to 300.53 KB.
➜ partner-page git:(master) ✗ yarn build
yarn run v1.22.4
$ contentful-extension-scripts build
✨ Built in 83.62s.
build/src.76b811d4.js ⚠️ 1.34 MB 81.17s
├── node_modules/@contentful/forma-36-react-components/dist/esm/index.js 300.53 KB 11.20s
├── node_modules/slate/lib/slate.es.js 145.78 KB 11.59s
├── node_modules/react-dom/cjs/react-dom.production.min.js 103.5 KB 7.96s
├── node_modules/@contentful/field-editor-rich-text/dist/field-editor-rich-text.esm.js 81.35 KB 12.33s
├── node_modules/@contentful/mimetype/node_modules/lodash/lodash.js 69.27 KB 7.04s
├── node_modules/moment/moment.js 57.67 KB 9.21s
├── node_modules/immutable/dist/immutable.js 55.31 KB 10.21s
├── node_modules/slate-react/lib/slate-react.es.js 41.75 KB 8.10s
├── node_modules/@contentful/field-editor-reference/dist/field-editor-reference.esm.js 32.42 KB 6.47s
├── node_modules/react-sortable-hoc/dist/react-sortable-hoc.esm.js 25.99 KB 6.80s
└── + 610 more assets
build/src.6db4c87c.css 66.36 KB 26.39s
├── node_modules/@contentful/forma-36-react-components/dist/styles.css 62.6 KB 19.28s
├── node_modules/@contentful/forma-36-tokens/dist/css/index.css 1.02 KB 19.30s
├── src/index.css 691 B 19.27s
├── node_modules/@contentful/forma-36-tokens/dist/css/z-index.css 226 B 1.67s
├── node_modules/@contentful/forma-36-tokens/dist/css/typography/font-stack.css 224 B 2.21s
├── node_modules/@contentful/forma-36-tokens/dist/css/spacing.css 179 B 4.26s
├── node_modules/@contentful/forma-36-tokens/dist/css/colors/colors-elements.css 158 B 1.81s
├── node_modules/@contentful/forma-36-tokens/dist/css/colors/colors-orange.css 150 B 1.88s
├── node_modules/@contentful/forma-36-tokens/dist/css/colors/colors-purple.css 150 B 1.88s
├── node_modules/@contentful/forma-36-tokens/dist/css/colors/colors-yellow.css 150 B 2.11s
└── + 21 more assets
build/index.html 209 B 2.35s
Extension size: 1 MB from 512 KB allowed.
Your extensions exceeds max size. It cannot be hosted by Contentful.
✨ Done in 99.88s.
Any updates on this?
from forma-36.
We've just released Forma v4 and, when using it with create-contentful-app
CLI, gives a quite good tree-shaking out of the box.
If your tool doesn't support tree-shaking, you can import components from smaller packages with v4. For example:
import { Button } from '@contentful/f36-components';
// or
import { Button } from '@contentful/f36-button';
Here's bundle output:
from forma-36.
Related Issues (20)
- 🐛 Bug - Popover Component Logs Warnings Due To Invalid Popper Usage HOT 4
- 🐛 Bug - onTabChange fires twice HOT 1
- 💡 Proposal - allow Multiselect component to accept disabled state HOT 2
- 💡 Proposal - allow Multiselect component to accept invalid state HOT 2
- 🐛 Bug - Multiselect dropdown not positioned correctly (missing portal?) HOT 2
- 🐛 Bug - Stack alignContent="center" not correct for FormControl with TextInput and FormControl.HelpText HOT 1
- 🐛 Bug - EntityListItem actions click doesn't prevent entire card click HOT 3
- 💬 Feedback - Color system HOT 3
- 💬 Feedback - Box shadow focus style outside of iframe when embedding HOT 10
- 🐛 Bug - Autocomplete loading state not shown unless it has data HOT 6
- 💬 Feedback - Autocomplete HOT 4
- 💬 Feedback - Multiselect.SelectAll should expose itemId as a prop HOT 1
- 🐛 Bug - Missing peerDependency warnings when installing packages using Yarn (modern) HOT 1
- 💡 Proposal - onOpenStateChanged callback for Datepicker component HOT 1
- 🐛 Bug - Text component does not allow to control the letter spacing HOT 3
- 🐛 Bug - Autocomplete onSelectItem is not working properly when we select twice the same element
- 🐛 Bug - Autocomplete onSelectItem is not executed when an item is selected a second time HOT 5
- 💡 Proposal - Enable passing a customised `Badge` to `EntryCard` HOT 2
- 💡 Proposal - Add JSON Editor component HOT 1
- 🐛 Bug - EntityList.Item loading container is much taller than the not loading one HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forma-36.