mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Revert "Change target to ES5 for targeting Hermes Engine, disable noEmitHelpers, don't crash if registerOnGlobalContext fails, and disable the special transform for NativeClass decorator"
This reverts commit 7e0497c8b1.
This commit is contained in:
@@ -274,7 +274,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
|
||||
},
|
||||
getCustomTransformers() {
|
||||
return {
|
||||
before: [],
|
||||
before: [require('../transformers/NativeClass').default],
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -5,8 +5,6 @@ import ts from 'typescript';
|
||||
*/
|
||||
export default function (ctx: ts.TransformationContext) {
|
||||
function isNativeClassExtension(node: ts.ClassDeclaration) {
|
||||
return false;
|
||||
|
||||
let decorators: Readonly<ts.Decorator[]>;
|
||||
|
||||
if ('canHaveDecorators' in ts && ts.canHaveDecorators(node)) {
|
||||
@@ -37,7 +35,7 @@ export default function (ctx: ts.TransformationContext) {
|
||||
node.getText().replace(/@NativeClass(\((.|\n)*?\))?/gm, ''),
|
||||
{
|
||||
compilerOptions: {
|
||||
noEmitHelpers: false,
|
||||
noEmitHelpers: true,
|
||||
module: ts.ModuleKind.ESNext,
|
||||
target: ts.ScriptTarget.ES5,
|
||||
experimentalDecorators: true,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"compilerOptions": {
|
||||
"rootDir": ".",
|
||||
"baseUrl": ".",
|
||||
"target": "es5",
|
||||
"target": "es2017",
|
||||
"module": "commonjs",
|
||||
"outDir": "./dist",
|
||||
"declaration": true,
|
||||
|
||||
Reference in New Issue
Block a user