Change pattern for telling if linked
This commit is contained in:
parent
d4ac67dba8
commit
e0cda43724
@ -50,7 +50,7 @@ export async function getPrettier(): Promise<PrettierAndConfigHash> {
|
|||||||
// of prettier, that is the one of the project, not the one of this repo.
|
// of prettier, that is the one of the project, not the one of this repo.
|
||||||
// So we do a sketchy eval to bypass ncc.
|
// So we do a sketchy eval to bypass ncc.
|
||||||
// We make sure to only do that when linking, otherwise we import properly.
|
// We make sure to only do that when linking, otherwise we import properly.
|
||||||
if (readThisNpmPackageVersion() === "0.0.0") {
|
if (readThisNpmPackageVersion().startsWith("0.0.0")) {
|
||||||
eval(
|
eval(
|
||||||
`${symToStr({ prettier })} = require("${pathResolve(pathJoin(getNodeModulesBinDirPath(), "..", "prettier"))}")`
|
`${symToStr({ prettier })} = require("${pathResolve(pathJoin(getNodeModulesBinDirPath(), "..", "prettier"))}")`
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user