Skip to content

Commit

Permalink
reconcile bug fixes from rebasing master and 0.26.2 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Nov 3, 2022
1 parent 337d5bc commit 00e2df7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions packages/cli/src/lifecycles/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async function optimizeStaticPages(compilation, optimizeResources) {
const { scratchDir, outputDir } = compilation.context;

return Promise.all(compilation.graph
.filter(page => !page.isSSR || (page.isSSR && page.data.static))
.filter(page => !page.isSSR || (page.isSSR && page.data.static) || (page.isSSR && compilation.config.prerender))
.map(async (page) => {
const { route, outputPath } = page;
const html = await fs.promises.readFile(path.join(scratchDir, outputPath), 'utf-8');
Expand Down Expand Up @@ -122,8 +122,6 @@ const bundleCompilation = async (compilation) => {

return new Promise(async (resolve, reject) => {
try {
compilation.graph = compilation.graph.filter(page => !page.isSSR || (page.isSSR && page.data.static) || (page.isSSR && compilation.config.prerender));

const optimizeResourcePlugins = compilation.config.plugins.filter((plugin) => {
return plugin.type === 'resource';
}).map((plugin) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { JSDOM } from 'jsdom';
import path from 'path';
import { getSetupFiles, getOutputTeardownFiles } from '../../../../../test/utils.js';
import request from 'request';
import { runSmokeTest } from '../../../../../test/smoke-test.js';
import { Runner } from 'gallinago';
import { fileURLToPath, URL } from 'url';

Expand Down Expand Up @@ -64,8 +63,6 @@ describe('Build Greenwood With: ', function() {
});
});

runSmokeTest(['public', 'index'], LABEL);

let response = {};
let artistsPageDom;
let homePageDom;
Expand Down Expand Up @@ -147,7 +144,7 @@ describe('Build Greenwood With: ', function() {
});

// this is limited by the fact SSR routes have to write to the fs in order to bundle a page on the fly
xit('should not emit a static file', function(done) {
it('should not emit a static file', function(done) {
const ssrPageOutput = fs.existsSync(path.join(outputPath, 'public/artists/index.html'));

expect(ssrPageOutput).to.be.false;
Expand Down

0 comments on commit 00e2df7

Please sign in to comment.