Parse import-assertions (#12139)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com> Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
This commit is contained in:
13
packages/babel-plugin-syntax-import-assertions/src/index.js
Normal file
13
packages/babel-plugin-syntax-import-assertions/src/index.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { declare } from "@babel/helper-plugin-utils";
|
||||
|
||||
export default declare(api => {
|
||||
api.assertVersion(7);
|
||||
|
||||
return {
|
||||
name: "syntax-import-assertions",
|
||||
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.push(["importAssertions"]);
|
||||
},
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user