mirror of
https://github.com/tabler/tabler-icons.git
synced 2025-01-29 10:20:52 +01:00
Use fs.readFileSync
+ JSON.parse
to read compile options (#702)
This commit is contained in:
parent
1b0356812d
commit
a8b3eb11f0
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user