diff --git a/other-packages/babel-plugin-export-metadata/src/index.js b/other-packages/babel-plugin-export-metadata/src/index.js index 5b8d87dfa..82bbf86e3 100644 --- a/other-packages/babel-plugin-export-metadata/src/index.js +++ b/other-packages/babel-plugin-export-metadata/src/index.js @@ -3,7 +3,7 @@ const { default: template } = require('@babel/template') const { get } = require('lodash') const buildFileMeta = template(` - if (typeof ID !== 'undefined' && ID && ID === Object(ID)) { + if (typeof ID !== 'undefined' && ID && ID === Object(ID) && Object.isExtensible(ID)) { Object.defineProperty(ID, '__filemeta', { enumerable: true, configurable: true,