diff --git a/packages/babel-plugin-syntax-import-reflection/README.md b/packages/babel-plugin-syntax-import-reflection/README.md new file mode 100644 index 000000000000..589f6615d8ba --- /dev/null +++ b/packages/babel-plugin-syntax-import-reflection/README.md @@ -0,0 +1,19 @@ +# @babel/plugin-syntax-import-reflection + +> Allow parsing of the reflection attributes in the import statement + +See our website [@babel/plugin-syntax-import-reflection](https://babeljs.io/docs/en/babel-plugin-syntax-import-reflection) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/plugin-syntax-import-reflection +``` + +or using yarn: + +```sh +yarn add @babel/plugin-syntax-import-reflection --dev +``` diff --git a/packages/babel-plugin-syntax-import-reflection/package.json b/packages/babel-plugin-syntax-import-reflection/package.json new file mode 100644 index 000000000000..6e3906871e07 --- /dev/null +++ b/packages/babel-plugin-syntax-import-reflection/package.json @@ -0,0 +1,50 @@ +{ + "name": "@babel/plugin-syntax-import-reflection", + "version": "7.18.6", + "description": "Allow parsing of the reflection attributes in the import statement", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-plugin-syntax-import-reflection" + }, + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "main": "./lib/index.js", + "keywords": [ + "babel-plugin" + ], + "dependencies": { + "@babel/helper-plugin-utils": "workspace:^" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + }, + "devDependencies": { + "@babel/core": "workspace:^" + }, + "engines": { + "node": ">=6.9.0" + }, + "author": "The Babel Team (https://babel.dev/team)", + "conditions": { + "BABEL_8_BREAKING": [ + null, + { + "exports": null + } + ], + "USE_ESM": [ + { + "type": "module" + }, + null + ] + }, + "exports": { + ".": "./lib/index.js", + "./package.json": "./package.json" + }, + "type": "commonjs" +} diff --git a/packages/babel-plugin-syntax-import-reflection/src/index.ts b/packages/babel-plugin-syntax-import-reflection/src/index.ts new file mode 100644 index 000000000000..d371a47f3840 --- /dev/null +++ b/packages/babel-plugin-syntax-import-reflection/src/index.ts @@ -0,0 +1,13 @@ +import { declare } from "@babel/helper-plugin-utils"; + +export default declare(api => { + api.assertVersion(7); + + return { + name: "syntax-import-reflection", + + manipulateOptions(_, parserOpts) { + parserOpts.plugins.push("importReflection"); + }, + }; +}); diff --git a/tsconfig.json b/tsconfig.json index 8869ed393c1e..4dd62fd01e8e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -81,6 +81,7 @@ "./packages/babel-plugin-syntax-function-bind/src/**/*.ts", "./packages/babel-plugin-syntax-function-sent/src/**/*.ts", "./packages/babel-plugin-syntax-import-assertions/src/**/*.ts", + "./packages/babel-plugin-syntax-import-reflection/src/**/*.ts", "./packages/babel-plugin-syntax-jsx/src/**/*.ts", "./packages/babel-plugin-syntax-module-blocks/src/**/*.ts", "./packages/babel-plugin-syntax-partial-application/src/**/*.ts", @@ -407,6 +408,9 @@ "@babel/plugin-syntax-import-assertions": [ "./packages/babel-plugin-syntax-import-assertions/src" ], + "@babel/plugin-syntax-import-reflection": [ + "./packages/babel-plugin-syntax-import-reflection/src" + ], "@babel/plugin-syntax-jsx": [ "./packages/babel-plugin-syntax-jsx/src" ],