-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to make bundle size smaller (#179)
* Try to make bundle size smaller * Export in multiple bundles by hand. Still not tree-shaking by at least is a plus. * Bump version
- Loading branch information
Showing
26 changed files
with
150 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"plugins": [ | ||
"inline-react-svg", | ||
[ | ||
"@babel/plugin-proposal-class-properties", | ||
{ | ||
"loose": true | ||
} | ||
] | ||
], | ||
"presets": [ | ||
[ | ||
"@babel/env", | ||
{ | ||
"modules": false, | ||
"useBuiltIns": false | ||
} | ||
], | ||
"@babel/preset-react" | ||
], | ||
"env": { | ||
"test": { | ||
"presets": ["@babel/env"] | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,70 @@ | ||
import babel from "rollup-plugin-babel"; | ||
import postcss from "rollup-plugin-postcss"; | ||
import pkg from "./package.json"; | ||
import image from "@rollup/plugin-image"; | ||
|
||
export default { | ||
input: "src/index.js", | ||
input: { | ||
index: "src/index.js", | ||
Accordion: "src/components/accordion/accordion", | ||
Button: "src/components/button/button", | ||
Checkbox: "src/components/checkbox/checkbox", | ||
Input: "src/components/input/input", | ||
Label: "src/components/label/label", | ||
DevelopedBy: "src/components/developed-by/developed-by", | ||
FooterLinks: "src/components/footer/footer-links", | ||
FooterLinkHeader: "src/components/footer/footer-links", | ||
FooterLinkItem: "src/components/footer/footer-links", | ||
Footer: "src/components/footer/footer", | ||
Header: "src/components/header/header", | ||
Hero: "src/components/hero/hero", | ||
IncubatedBy: "src/components/incubated-by/incubated-by", | ||
Banner: "src/components/banner/banner", | ||
Instruments: "src/components/instruments/instruments", | ||
InstrumentsItem: "src/components/instruments-item/instruments-item", | ||
Select: "src/components/select/select", | ||
RadioList: "src/components/radio-list/radio-list", | ||
LoginForm: "src/components/login-form/login-form", | ||
List: "src/components/list/list", | ||
ListHeader: "src/components/list-header/list-header", | ||
ListItem: "src/components/list-item/list-item", | ||
SearchResultListItem: | ||
"src/components/search-result-list-item/search-result-list-item", | ||
Logo: "src/components/logo/logo", | ||
SearchInput: "src/components/search-input/search-input", | ||
SocialsShare: "src/components/social-share/social-share", | ||
CompletedFormTable: | ||
"src/components/completed-form-table/completed-form-table", | ||
TemperatureChart: "src/components/temperature-chart/temperature-chart", | ||
PersonalDataTable: "src/components/personal-data-table/personal-data-table", | ||
MailchimpSubscribe: "src/components/subscribe/mailchimp-subscribe", | ||
SubscribeForm: "src/components/subscribe/subscribe-form", | ||
Form: "src/components/form/form", | ||
SidebarMenu: "src/components/sidebar-menu/sidebar-menu", | ||
SidebarMenuItem: "src/components/sidebar-menu-item/sidebar-menu-item", | ||
BackToTop: "src/components/back-to-top/back-to-top", | ||
DataTable: "src/components/data-table/data-table", | ||
DataTableItem: "src/components/data-table-item/data-table-item", | ||
DataTableRow: "src/components/data-table-row/data-table-row", | ||
FilterModal: "src/components/filter-modal/filter-modal", | ||
DropdownSearch: "src/components/dropdown-search/dropdown-search", | ||
HeaderFilter: "src/components/header-filter/header-filter", | ||
}, | ||
output: [ | ||
{ | ||
file: pkg.main, | ||
format: "cjs", | ||
exports: "named", | ||
dir: "dist", | ||
format: "es", | ||
sourcemap: true, | ||
strict: false | ||
}, | ||
{ | ||
file: pkg.module, | ||
format: "es", | ||
sourcemap: true | ||
} | ||
], | ||
plugins: [ | ||
image(), | ||
postcss({ | ||
extract: true, | ||
minimize: true | ||
minimize: true, | ||
}), | ||
babel({ | ||
runtimeHelpers: true | ||
}) | ||
exclude: "node_modules/**", | ||
}), | ||
], | ||
external: ["react", "react-dom", "prop-types"] | ||
external: ["react", "react-dom", "prop-types", "debug", "assert"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// @import "react-datepicker/dist/react-datepicker.css"; | ||
|
||
.date-picker > div:nth-child(2) { | ||
width: 100%; | ||
} | ||
|
||
.react-datepicker__day--outside-month { | ||
color: #bbbbbb; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/components/search-result-list-item/search-result-list-item.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.
3008851
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: