Deprecated Babel preset that previously provided Stage 1 JavaScript experimental features
npx @tessl/cli install tessl/npm-babel--preset-stage-1@7.8.0@babel/preset-stage-1 is a deprecated Babel preset package that previously provided Stage 1 JavaScript experimental features and language proposals. As of Babel v7.0.0-beta.55, all stage presets have been removed and this package now only exports an error-throwing function to guide users toward explicit plugin configuration.
npm install @babel/preset-stage-1 (not recommended - deprecated)import preset from "@babel/preset-stage-1";For CommonJS:
const preset = require("@babel/preset-stage-1");Warning: This package is deprecated and will throw an error when used.
import preset from "@babel/preset-stage-1";
// This will throw an Error with deprecation information
const config = preset();Babel configuration (will throw error):
{
"presets": ["@babel/preset-stage-1"]
}This package contains a single function that immediately throws an error when called. The error provides comprehensive migration guidance including:
The main and only export that throws a deprecation error with migration guidance.
/**
* Deprecated preset factory that throws an error with migration guidance
* @throws {Error} Always throws with detailed deprecation information
* @returns {never} Never returns - always throws
*/
export default function(): never;The thrown error message includes:
{
"plugins": [
// Stage 1
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
["@babel/plugin-proposal-optional-chaining", { "loose": false }],
["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }],
["@babel/plugin-proposal-nullish-coalescing-operator", { "loose": false }],
"@babel/plugin-proposal-do-expressions",
// Stage 2
["@babel/plugin-proposal-decorators", { "legacy": true }],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
// Stage 3
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
["@babel/plugin-proposal-class-properties", { "loose": false }],
"@babel/plugin-proposal-json-strings"
]
}module.exports = function() {
return {
plugins: [
require("@babel/plugin-syntax-dynamic-import"),
[require("@babel/plugin-proposal-decorators"), { "legacy": true }],
[require("@babel/plugin-proposal-class-properties"), { "loose": false }],
],
presets: [
// ...
],
};
};This package always throws an Error when the preset function is called. The error is intentional and provides migration guidance. There is no way to suppress this error - the package is designed to prevent usage and direct users to explicit plugin configuration.
@babel/preset-stage-1 originally provided access to experimental JavaScript features that were in Stage 1 of the TC39 proposal process. These included:
export { default } from './module' syntax&&=, ||=, ??= operatorsobj?.prop?.method?.() syntaxvalue |> transform syntax (minimal proposal)value ?? fallback operatorlet x = do { ... } syntaxThe deprecation was part of Babel's shift toward more explicit, maintainable configuration where developers consciously choose specific experimental features rather than opting into entire stage groupings.
Instead of using this deprecated preset, explicitly configure the individual plugins you need:
npx babel-upgrade for automatic migrationFor compatibility, ensure @babel/plugin-proposal-decorators comes before @babel/plugin-proposal-class-properties, and use loose: true for class properties when using legacy decorators.