vite-plugin-babel-import
vite-plugin-babel-import copied to clipboard
Add abilities to not transform some code
Some of mine code with .js suffix is not JSX syntax and throw error, is there any way to exclude from parsing or add option to parse.
[vite] Internal server error: This experimental syntax requires enabling the parser plugin: 'classProperties' (3:11)
Plugin: vite-plugin-babel-import
File: /repository/amantiq/user-portal/src/api/config.js
1 | import { runInAction, makeAutoObservable } from "mobx";
2 | class ConfigAPI {
3 | config = null
| ^
4 |
5 | constructor(api) {
SyntaxError: This experimental syntax requires enabling the parser plugin: 'classProperties' (3:11)
at Object._raise (D:\repository\amantiq\user-portal\node_modules\@babel\parser\lib\index.js:748:17)
at Object.raiseWithData (D:\repository\amantiq\user-portal\node_modules\@babel\parser\lib\index.js:741:17)
at Object.expectPlugin (D:\repository\amantiq\user-portal\node_modules\@babel\parser\lib\index.js:9106:18)
at Object.parseClassProperty (D:\repository\amantiq\user-portal\node_modules\@babel\parser\lib\index.js:12722:12)
at Object.pushClassProperty (D:\repository\amantiq\user-portal\node_modules\@babel\parser\lib\index.js:12690:30)
at Object.parseClassMemberWithIsStatic (D:\repository\amantiq\user-portal\node_modules\@babel\parser\lib\index.js:12595:14)
at Object.parseClassMember (D:\repository\amantiq\user-portal\node_modules\@babel\parser\lib\index.js:12532:10)
at D:\repository\amantiq\user-portal\node_modules\@babel\parser\lib\index.js:12477:14
at Object.withTopicForbiddingContext (D:\repository\amantiq\user-portal\node_modules\@babel\parser\lib\index.js:11516:14)
at Object.parseClassBody (D:\repository\amantiq\user-portal\node_modules\@babel\parser\lib\index.js:12454:10)