Skip to content

Commit f29adf3

Browse files
authoredApr 4, 2022
fix: 🐛 include terser bundle into netlify functions (#1295)
* fix: 🐛 include terser bundle into netlify functions Resolves issues where AMP would work locally, but not on a deployed site * test: update list of files within test * test: specify expected element to be searching for to avoid returning nextjs-route-announcer element
·
1 parent 830b9aa commit f29adf3

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed
 

‎cypress/integration/default/preview.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ describe('Preview Mode', () => {
22
it('enters and exits preview mode', () => {
33
// preview mode is off by default
44
cy.visit('/previewTest')
5-
cy.findByText('Is preview? No')
5+
cy.findByText('Is preview? No', {selector: 'h1'})
66

77
// enter preview mode
88
cy.request('/api/enterPreview').then((response) => {

‎src/helpers/config.ts

-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ export const configureHandlerFunctions = ({ netlifyConfig, publish, ignore = []
7676
`!${nextRoot}/dist/next-server/server/lib/squoosh/**/*.wasm`,
7777
`!${nextRoot}/dist/compiled/webpack/bundle4.js`,
7878
`!${nextRoot}/dist/compiled/webpack/bundle5.js`,
79-
`!${nextRoot}/dist/compiled/terser/bundle.min.js`,
8079
)
8180
}
8281

‎test/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ describe('onBuild()', () => {
358358
`!node_modules/next/dist/next-server/server/lib/squoosh/**/*.wasm`,
359359
'!node_modules/next/dist/compiled/webpack/bundle4.js',
360360
'!node_modules/next/dist/compiled/webpack/bundle5.js',
361-
'!node_modules/next/dist/compiled/terser/bundle.min.js',
362361
'!node_modules/sharp/**/*',
363362
]
364363
// Relative paths in Windows are different

0 commit comments

Comments
 (0)
Please sign in to comment.