babel-plugin-transform-import-meta-x
v0.0.3
Published
Transforms import.meta[x] subproperties
Downloads
340
Maintainers
Readme
babel-plugin-transform-import-meta-x
This is a Babel plugin that transforms import.meta
subproperty access to any other literal value.
This module is derived from the babel-plugin-transform-import-meta project.
Usage:
{
"plugins": [
"babel-plugin-transform-import-meta-x",
{ replacements: { foobar: '{}' } }
]
}
Run on the following code it will produce the following output:
// src.js
console.log(import.meta.foobar);
// output:
console.log({});