babel-plugin-optimize-object-literals Transforms object literals into JSON.parse calls. npm install --save-dev babel-plugin-optimize-object-literals In // @stringify const obj = { foo: 'bar' }; Out const obj = JSON.parse(`{"foo":"bar"}`);