After the mini program uses the Class feature, the following exception may occur during compilation:
Uncaught SyntaxError: Unexpected token export
Uncaught SyntaxError: Unexpected token import
...... A script error occurs Or Page() is not called correctly
As shown:
Click "Project" on the left toolbar, Check "Enable ES6 to ES5"
As shown in the picture:
The above is the detailed content of Compilation exception occurs after using Class. For more information, please follow other related articles on the PHP Chinese website!