Closed Megha-Dev-19 closed 3 weeks ago
the line with the build
script in package.json does not seem to copy .jsx
files when combining typescript
and jsx
in transforms.
a quick fix is to have two sucrase
commands like this:
"build": "npm run fmt && rimraf .bos/transpiled && mkdir -p .bos/transpiled/src && sucrase ./src -d .bos/transpiled/src/neardevhub-trustees --transforms jsx --jsx-runtime preserve --disable-es-transforms --out-extension jsx && sucrase ./src -d .bos/transpiled/src/neardevhub-trustees --transforms typescript --jsx-runtime preserve --disable-es-transforms --out-extension jsx && node ./build.js",
@Megha-Dev-19 see my latest commit that makes sure that both transpiled tsx and jsx files are copied. It also fixes so that every line starting with export
in common.tsx is adjusted to not contain the export
statement.
@Megha-Dev-19 Check out the watcher in the latest commit. You can now run npm run build:watch
to automatically build when there are changes in the src folder.
@petersalomonsen thank you so much, everything works as expected
added two new tests for logged in as moderator and not logged in scenarios
Closing, since we will integrate bos-workspace
src
folder to trigger build when there are changesexport
was removed )jsx
andtsx
in the same project