@samitouri / QOS-React-2 / commits / 003a1772ab

Fix broken import path in test262-preprocessor

Previously we weren't ever clearing the `dist` directory so there were likely some vestigial files left over from previous builds that might have confused the import path. This commit fixes the import path and also deletes the `dist` directory on every build to ensure a clean slate.

Lauren Tan committed Dec 21, 2022 at 16:04 UTC 003a1772abd3d79de13ed348d2841553751ac31b
2 files changed +3 -2
compiler/forget/package.json
+2 -1
@@ -8,7 +8,7 @@
8 "src"
9 ],
10 "scripts": {
11 - "build": "tsc && scripts/hash-dist.sh",
11 + "build": "rimraf dist && tsc && scripts/hash-dist.sh",
12 "bundle:meta": "scripts/bundle-meta.sh",
13 "dev": "concurrently --kill-others \"tsc --watch\" \"yarn:playground\"",
14 "playground": "cd packages/playground && yarn && yarn dev",
@@ -59,6 +59,7 @@
59 "jest-environment-jsdom": "^29.0.3",
60 "react": "^18.2.0",
61 "react-dom": "^18.2.0",
62 + "rimraf": "^3.0.2",
63 "test262-harness": "^8.0.0",
64 "ts-jest": "^29.0.1",
65 "ts-node": "^10.9.1",
compiler/forget/scripts/test262-preprocessor.js
+1 -1
@@ -1,4 +1,4 @@
1 -const BabelPluginReactForget = require("../dist/BabelPlugin").default;
1 +const BabelPluginReactForget = require("../dist/Babel/BabelPlugin").default;
2 const transformSync = require("@babel/core").transformSync;
3
4 // Preprocessor that runs Forget on the test262 test prior to execution. Compilation errors short