Rely on implicit writable false.

This commit is contained in:
flash 2024-02-10 04:27:54 +00:00
parent bc6532cfc5
commit 7d23bea36c

View file

@ -59,7 +59,7 @@ exports.process = async function(root, options) {
const bvProps = [];
for(const bvName in options.buildVars)
bvProps.push(`${bvName}: { value: ${JSON.stringify(options.buildVars[bvName])}, writable: false }`);
bvProps.push(`${bvName}: { value: ${JSON.stringify(options.buildVars[bvName])} }`);
if(Object.keys(bvProps).length > 0)
output += `Object.defineProperties(${bvTarget}, { ${bvProps.join(', ')} });\n`;