fix(webpack): don't require ts transformer unless processing ts file

This commit is contained in:
Igor Randjelovic
2020-08-27 23:33:16 +02:00
parent d443d85ace
commit fa9f0957b8
3 changed files with 7 additions and 5 deletions

View File

@ -11,7 +11,6 @@ const NsVueTemplateCompiler = require("nativescript-vue-template-compiler");
const nsWebpack = require("@nativescript/webpack");
const nativescriptTarget = require("@nativescript/webpack/nativescript-target");
const nsTransformNativeClasses = require("@nativescript/webpack/transformers/ns-transform-native-classes").default;
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
const hashSalt = Date.now().toString();
@ -268,7 +267,9 @@ module.exports = env => {
declaration: false
},
getCustomTransformers: (program) => ({
before: [nsTransformNativeClasses]
before: [
require("@nativescript/webpack/transformers/ns-transform-native-classes").default
]
})
},
},