4
0
forked from crowetic/commerce

Merge pull request #75 from vercel/develop

More Performance Changes
This commit is contained in:
B 2020-11-06 20:43:22 -03:00 committed by GitHub
commit b67f145876
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1134 additions and 37 deletions

23
.editorconfig Normal file
View File

@ -0,0 +1,23 @@
root = true
[*]
indent_style = space
indent_size = 2
tab_width = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[*.js]
quote_type = single
[{*.c,*.cc,*.h,*.hh,*.cpp,*.hpp,*.m,*.mm,*.mpp,*.js,*.java,*.go,*.rs,*.php,*.ng,*.jsx,*.ts,*.d,*.cs,*.swift}]
curly_bracket_next_line = false
spaces_around_operators = true
spaces_around_brackets = outside
# close enough to 1TB
indent_brace_style = K&R

View File

@ -56,7 +56,7 @@ const Navbar: FC = () => {
</div> </div>
<div className="flex pb-4 lg:px-6 lg:hidden"> <div className="flex pb-4 lg:px-6 lg:hidden">
<Searchbar id="mobileSearch" /> <Searchbar id="mobile-search" />
</div> </div>
</Container> </Container>
</div> </div>

View File

@ -1,4 +1,10 @@
module.exports = {
const bundleAnalyzer = require('@next/bundle-analyzer')({
enabled: !!process.env.BUNDLE_ANALYZE
})
module.exports = bundleAnalyzer({
images: { images: {
domains: ['cdn11.bigcommerce.com'], domains: ['cdn11.bigcommerce.com'],
}, },
@ -50,4 +56,4 @@ module.exports = {
}, },
] ]
}, },
} });

View File

@ -4,11 +4,33 @@
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next start" "start": "next start",
"analyze": "BUNDLE_ANALYZE=both yarn build",
"find:unused": "next-unused"
}, },
"prettier": { "prettier": {
"semi": false, "semi": false,
"singleQuote": true "singleQuote": true
},
"next-unused": {
"alias": {
"@lib/*": ["lib/*"],
"@assets/*": ["assets/*"],
"@config/*": ["config/*"],
"@components/*": ["components/*"],
"@utils/*": ["utils/*"]
},
"debug": true,
"include": [
"components",
"lib",
"pages"
],
"exclude": [
],
"entrypoints": [
"pages"
]
}, },
"dependencies": { "dependencies": {
"@bigcommerce/storefront-data-hooks": "^1.0.2", "@bigcommerce/storefront-data-hooks": "^1.0.2",
@ -37,6 +59,7 @@
"tailwindcss": "^1.9" "tailwindcss": "^1.9"
}, },
"devDependencies": { "devDependencies": {
"@next/bundle-analyzer": "^10.0.1",
"@types/bunyan": "^1.8.6", "@types/bunyan": "^1.8.6",
"@types/bunyan-prettystream": "^0.1.31", "@types/bunyan-prettystream": "^0.1.31",
"@types/classnames": "^2.2.10", "@types/classnames": "^2.2.10",
@ -46,6 +69,7 @@
"@types/react": "^16.9.49", "@types/react": "^16.9.49",
"bunyan": "^1.8.14", "bunyan": "^1.8.14",
"bunyan-prettystream": "^0.1.3", "bunyan-prettystream": "^0.1.3",
"next-unused": "^0.0.3",
"postcss-flexbugs-fixes": "^4.2.1", "postcss-flexbugs-fixes": "^4.2.1",
"postcss-preset-env": "^6.7.0", "postcss-preset-env": "^6.7.0",
"prettier": "^2.1.2", "prettier": "^2.1.2",

View File

@ -1,4 +1,7 @@
module.exports = { module.exports = {
future: {
purgeLayersByDefault: true,
},
purge: { purge: {
content: [ content: [
'./pages/**/*.{js,ts,jsx,tsx}', './pages/**/*.{js,ts,jsx,tsx}',

1107
yarn.lock

File diff suppressed because it is too large Load Diff