{"id":19170,"library":"babel-plugin-strip-glimmer-utils","title":"babel-plugin-strip-glimmer-utils","description":"A Babel plugin that strips specific imports and usages from @glimmer/utils (e.g., unwrap, expect) in production builds. Version 0.1.1 is the latest. Designed for Ember/Glimmer applications to remove debug-only utility calls. Lightweight, no runtime dependencies. Alternative to manual tree-shaking.","status":"active","version":"0.1.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","babel-plugin"],"install":[{"cmd":"npm install babel-plugin-strip-glimmer-utils","lang":"bash","label":"npm"},{"cmd":"yarn add babel-plugin-strip-glimmer-utils","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-plugin-strip-glimmer-utils","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required as a peer dependency to function as a Babel plugin.","package":"@babel/core","optional":true}],"imports":[{"note":"Plugin is exported as default. Named export may lead to undefined.","wrong":"import { stripGlimmerUtils } from 'babel-plugin-strip-glimmer-utils'","symbol":"default export (plugin)","correct":"import stripGlimmerUtils from 'babel-plugin-strip-glimmer-utils'"},{"note":"Must provide configuration object with source and bindings.","wrong":"plugins: ['babel-plugin-strip-glimmer-utils']","symbol":"plugin usage in Babel config","correct":"plugins: [['strip-glimmer-utils', { source: '@glimmer/utils', bindings: ['unwrap'] }]]"},{"note":"Plugin is written as ESM; .default is needed for CJS require.","wrong":"const stripGlimmerUtils = require('babel-plugin-strip-glimmer-utils')","symbol":"require in Node.js (CJS)","correct":"const stripGlimmerUtils = require('babel-plugin-strip-glimmer-utils').default"}],"quickstart":{"code":"// babel.config.js\nmodule.exports = {\n  plugins: [\n    ['strip-glimmer-utils', {\n      source: '@glimmer/utils',\n      bindings: ['unwrap', 'expect']\n    }]\n  ]\n};\n\n// Before:\nimport { unwrap } from '@glimmer/utils';\nconsole.log(unwrap(someValue));\n\n// After (in production):\n// import removed, call replaced with its argument\nconsole.log(someValue);","lang":"javascript","description":"Demonstrates configuration and effect: removes unwrap and expect from @glimmer/utils in production."},"warnings":[{"fix":"Use Babel 7 or later; not compatible with Babel 6.","message":"Plugin only works with Babel 7+","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Verify the exact export names from the source package.","message":"Bindings listed in config must be actual named exports from @glimmer/utils; otherwise plugin may fail silently.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Consider forking or using manual tree-shaking. Check compatibility with your @glimmer/utils version.","message":"Plugin has not been updated in 4+ years; may not cover newer versions of @glimmer/utils.","severity":"deprecated","affected_versions":"<=0.1.1"}],"env_vars":null,"search_vec":"'0.1.1':25 'altern':44 'applic':32 'babel':2,8,52 'babel-plugin':51 'babel-plugin-strip-glimmer-util':1 'build':23 'call':39 'debug':36 'debug-on':35 'depend':43 'design':29 'e.g':18 'ember/glimmer':31 'expect':20 'glimmer':5 'glimmer/utils':17 'import':13 'javascript':50 'latest':28 'lightweight':40 'manual':46 'plugin':3,9,53 'product':22 'remov':34 'runtim':42 'shake':49 'specif':12 'strip':4,11 'tree':48 'tree-shak':47 'unwrap':19 'usag':15 'util':6,38 'version':24","created_at":"2026-04-25T11:16:24.182344+00:00","updated_at":"2026-04-25T11:16:24.182344+00:00","problems":[{"fix":"Use require('babel-plugin-strip-glimmer-utils').default","cause":"Plugin imported via require without .default in CJS environment.","error":"TypeError: Cannot read properties of undefined (reading 'default')"},{"fix":"Ensure configuration is { source: '@glimmer/utils', bindings: ['unwrap'] }","cause":"Missing or incorrect configuration object (e.g., passing string instead of array for bindings).","error":"Error: [BABEL] Unknown option: .bindings"},{"fix":"Install @glimmer/utils or adjust the 'source' option.","cause":"Source package not installed or misconfigured in config.","error":"Error: Cannot find module '@glimmer/utils'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/babel-plugin-strip-glimmer-utils","openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}