Mirror: The small sibling of the graphql package, slimmed down for client-side libraries.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove Object.freeze using transform

+21
+19
scripts/babel/transformObjectFreeze.mjs
··· 1 + const plugin = ({ types: t }) => { 2 + return { 3 + visitor: { 4 + CallExpression(path) { 5 + if ( 6 + t.isMemberExpression(path.node.callee) && 7 + t.isIdentifier(path.node.callee.object) && 8 + t.isIdentifier(path.node.callee.property) && 9 + path.node.callee.object.name === 'Object' && 10 + path.node.callee.property.name === 'freeze' 11 + ) { 12 + path.replaceWith(path.node.arguments[0]); 13 + } 14 + }, 15 + } 16 + }; 17 + }; 18 + 19 + export default plugin;
+2
scripts/rollup/config.mjs
··· 7 7 8 8 import babelModularGraphQL from 'babel-plugin-modular-graphql'; 9 9 import babelTransformDevAssert from '../babel/transformDevAssert.mjs'; 10 + import babelTransformObjectFreeze from '../babel/transformObjectFreeze.mjs'; 10 11 11 12 const cwd = process.cwd(); 12 13 const externalModules = ['dns', 'fs', 'path', 'url']; ··· 61 62 presets: [], 62 63 plugins: [ 63 64 babelTransformDevAssert, 65 + babelTransformObjectFreeze, 64 66 babelModularGraphQL, 65 67 'reghex/babel', 66 68 ],