Skip to content

repo sync #18842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"presets": ["next/babel"],
"plugins": [["styled-components", { "ssr": true }], "@babel/plugin-syntax-top-level-await"]
"plugins": ["styled-components"]
}
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN npm ci --no-optional --registry https://registry.npmjs.org/
# For Next.js v12+
# This the appropriate necessary extra for node:16-alpine
# Other options are https://www.npmjs.com/search?q=%40next%2Fswc
# RUN npm i @next/swc-linux-x64-musl --no-save
RUN npm i @next/swc-linux-x64-musl --no-save


# ---------------
Expand All @@ -46,8 +46,10 @@ COPY stylesheets ./stylesheets
COPY pages ./pages
COPY components ./components
COPY lib ./lib
# One part of the build relies on this content file to pull all-products
# Certain content is necessary for being able to build
COPY content/index.md ./content/index.md
COPY content/rest ./content/rest
COPY data ./data

COPY next.config.js ./next.config.js
COPY tsconfig.json ./tsconfig.json
Expand Down
2 changes: 1 addition & 1 deletion middleware/static-asset-caching.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export default function setStaticAssetCaching(req, res, next) {
// would make it intelligently different if its content has changed.
function isChecksummed(path) {
if (path.startsWith('/assets/cb-')) return true
if (path.startsWith('/_next/static') && /[a-f0-9]{20}/.test(path)) return true
if (path.startsWith('/_next/static') && /[a-f0-9]{16}/.test(path)) return true
return false
}
Loading