Skip to content

Commit dbf25c3

Browse files
committed
chore: Misc cleaning
1 parent 0b88585 commit dbf25c3

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

packages/cli/lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const envinfo = require('envinfo');
33
const sade = require('sade');
44
const notifier = require('update-notifier');
55
const { error } = require('./util');
6-
const pkg = require('../package');
6+
const pkg = require('../package.json');
77

88
const ver = process.version;
99
const min = pkg.engines.node;
@@ -12,7 +12,7 @@ if (
1212
.substring(1)
1313
.localeCompare(min.match(/\d+/g).join('.'), 'en', { numeric: true }) === -1
1414
) {
15-
return error(
15+
error(
1616
`You are using Node ${ver} but preact-cli requires Node ${min}. Please upgrade Node to continue!`,
1717
1
1818
);

packages/cli/lib/lib/constants.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/cli/lib/lib/webpack/render-html-plugin.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const prerender = require('./prerender');
1010
const createLoadManifest = require('./create-load-manifest');
1111
const { warn } = require('../../util');
1212
const { info } = require('../../util');
13-
const { PRERENDER_DATA_FILE_NAME } = require('../constants');
1413

1514
const PREACT_FALLBACK_URL = '/200.html';
1615

@@ -205,7 +204,7 @@ class PrerenderDataExtractPlugin {
205204
// We dont build prerender data for `200.html`. It can re-use the one for homepage.
206205
return;
207206
}
208-
let path = this.location_ + PRERENDER_DATA_FILE_NAME;
207+
let path = this.location_ + 'preact_prerender_data.json';
209208
if (path.startsWith('/')) {
210209
path = path.substr(1);
211210
}

0 commit comments

Comments
 (0)