Error in user YAML: (<unknown>): found character that cannot start any token while scanning for the next token at line 2 column 8
---
id: babel-plugin-syntax-bigint
title: @babel/plugin-syntax-bigint
sidebar_label: syntax-bigint
---
NOTE: This plugin is included in
@babel/preset-env
, in ES2020This plugin only enables parsing of this feature. Babel doesn't support transforming BigInts. One recommendation is to use the JSBI library and eventually run
babel-plugin-transform-jsbi-to-bigint
to codemod it to BigInt in the future.
npm install --save-dev @babel/plugin-syntax-bigint
{
"plugins": ["@babel/plugin-syntax-bigint"]
}
babel --plugins @babel/plugin-syntax-bigint script.js
require("@babel/core").transformSync("code", {
plugins: ["@babel/plugin-syntax-bigint"],
});