Registry / devops / es3ify-loader

es3ify-loader

JSON →
library0.2.0jsnpmunverified

A webpack loader that transforms JavaScript code to be ES3-compatible by converting reserved words (like catch, const, etc.) and other ES3-incompatible syntax. Version 0.2.0 is the latest release, with no recent updates since 2016. It relies on a PostCSS-based transformation approach. Different from other ES3ify tools (e.g., es3ify-webpack-plugin), this one operates as a loader for per-file transformation.

npm install es3ify-loader
INSTALL
IMPORT
SIG · ES3IFY-LOADER
E
es3ify-loader
devopsjavascriptv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

es3ify-loader
import es3ifyLoader from 'es3ify-loader'
const es3ifyLoader = require('es3ify-loader')
The loader is used in webpack config as a rule, not directly imported. The require() syntax may still work in Node but is not needed for typical usage.
default export
module.exports = { module: { rules: [{ test: /\.js$/, loader: 'es3ify-loader' }] } }
module.exports = { module: { rules: [{ test: /\.js$/, use: 'es3ify' }] } }
The loader is specified by its npm package name 'es3ify-loader' in webpack config. Using 'es3ify' (without '-loader') is a common mistake.

Shows how to configure webpack to apply ES3 transformation to all JavaScript files, converting reserved words like 'catch' to quoted property names.

// webpack.config.js module.exports = { module: { rules: [ { test: /\.js$/, loader: 'es3ify-loader', exclude: /node_modules/ } ] } }; // Then any .js file will be transformed // Input: var obj = { catch: 1 }; // Output: var obj = { "catch": 1 };
Debug
Known issues
deprecatedPackage is deprecated. The repository has not been updated since 2016 and the loader is no longer maintained.
fix
Consider using babel-preset-es3 or es3ify-webpack-plugin for ES3 compatibility.
affects: all
gotchaThis loader may not handle all ES3-incompatible syntax (e.g., trailing commas in array literals).
fix
Test thoroughly with your codebase. For comprehensive transformations, use a Babel preset.
affects: >=0
gotchaThe loader does not transpile other ES6+ features like arrow functions or let/const; it only transforms property access to quoted strings and similar ES3 fixes.
fix
Combine with babel-loader and appropriate presets for full ES3 output.
affects: >=0
Errors
Common errors & fixes
Module not found: Error: Can't resolve 'es3ify-loader'
The es3ify-loader package is not installed.
fix
Run 'npm install es3ify-loader --save-dev' and ensure it appears in your package.json.
Module build failed: Error: Loader "es3ify-loader" is not recognized
The loader name is misspelled or missing the '-loader' suffix.
fix
Use 'es3ify-loader' instead of 'es3ify' in webpack config.
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
es3ify-loader — npm install es3ify-loader · libregistry