Merge pull request #11922 from meteor/remove-production-replacable-check

Fix issues with HMR and meteor build --debug
This commit is contained in:
Renan Castro
2022-02-18 18:07:17 +00:00
committed by GitHub
2 changed files with 7 additions and 10 deletions

View File

@@ -1,5 +1,8 @@
if (!process.env.METEOR_HMR_SECRET) {
console.log('Restart Meteor to enable hot module replacement.');
} else {
// METEOR_PARENT_PID
if (process.env.METEOR_HMR_SECRET) {
__meteor_runtime_config__._hmrSecret = process.env.METEOR_HMR_SECRET;
} else if (process.env.METEOR_PARENT_PID) {
// if METEOR_PARENT_PID isn't set, then the app isn't being run by the meteor
// tool and restarting won't enable HRM.
console.log('Restart Meteor to enable hot module replacement.');
}

View File

@@ -929,13 +929,7 @@ function runWebAppServer() {
versionReplaceable: () =>
WebAppHashing.calculateClientHash(
manifest,
(_type, replaceable) => {
if (Meteor.isProduction && replaceable) {
throw new Error('Unexpected replaceable file in production');
}
return replaceable;
},
(_type, replaceable) => replaceable,
configOverrides
),
cordovaCompatibilityVersions: programJson.cordovaCompatibilityVersions,