Browse Source

Use `fs.readFileSync` + `JSON.parse` to read compile options (#702)

Koute 1 year ago
parent
commit
a8b3eb11f0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      .build/helpers.mjs

+ 1 - 1
.build/helpers.mjs

@@ -283,7 +283,7 @@ export const getCompileOptions = () => {
 
   if (fs.existsSync('../compile-options.json')) {
     try {
-      const tempOptions = require('../compile-options.json')
+      const tempOptions = JSON.parse(fs.readFileSync('../compile-options.json').toString())
 
       if (typeof tempOptions !== 'object') {
         throw 'Compile options file does not contain an json object'