File tree Expand file tree Collapse file tree 1 file changed +17
-15
lines changed
packages/@apphosting/adapter-nextjs/src Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -167,22 +167,24 @@ describe("route overrides", () => {
167
167
describe ( "next config overrides" , ( ) => {
168
168
let tmpDir : string ;
169
169
const nextConfigOverrideBody = `
170
- // This file was automatically generated by Firebase App Hosting adapter
171
- const fahOptimizedConfig = (config) => ({
172
- ...config,
173
- images: {
174
- ...(config.images || {}),
175
- ...(config.images?.unoptimized === undefined ? { unoptimized: true } : {}),
176
- },
177
- });
170
+ // This file was automatically generated by Firebase App Hosting adapter
171
+ const fahOptimizedConfig = (config) => ({
172
+ ...config,
173
+ images: {
174
+ ...(config.images || {}),
175
+ ...(config.images?.unoptimized === undefined && config.images?.loader === undefined
176
+ ? { unoptimized: true }
177
+ : {}),
178
+ },
179
+ });
178
180
179
- const config = typeof originalConfig === 'function'
180
- ? (...args) => {
181
- const resolvedConfig = originalConfig(...args);
182
- return fahOptimizedConfig(resolvedConfig);
183
- }
184
- : fahOptimizedConfig(originalConfig);
185
- ` ;
181
+ const config = typeof originalConfig === 'function'
182
+ ? (...args) => {
183
+ const resolvedConfig = originalConfig(...args);
184
+ return fahOptimizedConfig(resolvedConfig);
185
+ }
186
+ : fahOptimizedConfig(originalConfig);
187
+ ` ;
186
188
187
189
beforeEach ( ( ) => {
188
190
tmpDir = fs . mkdtempSync ( path . join ( os . tmpdir ( ) , "test-overrides" ) ) ;
You can’t perform that action at this time.
0 commit comments