Fail Build Programatically

Hello,

Is there a way to fail the build command through code? My use case is that I would like to assert that certain env variables are set during the build, and if not, throw. I tried adding a top level throw, however that doesn't fail the build (I assume rollup or whatever plasmo uses does not execute the files). I also tried process.exit(1) but didn't work (because the file itself is not being executed on build)
Was this page helpful?