mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup
This commit is contained in:
@@ -6,6 +6,7 @@ const nativescriptTarget = require('@nativescript/webpack/nativescript-target');
|
||||
const {
|
||||
nsSupportHmrNg
|
||||
} = require('@nativescript/webpack/transformers/ns-support-hmr-ng');
|
||||
const nsTransformNativeClasses = require("@nativescript/webpack/transformers/ns-transform-native-classes").default;
|
||||
const {
|
||||
getMainModulePath
|
||||
} = require('@nativescript/webpack/utils/ast-utils');
|
||||
|
||||
@@ -51,6 +51,7 @@ const webpackConfigAngular = proxyquire('./webpack.angular', {
|
||||
return FakeHmrTransformerFlag;
|
||||
},
|
||||
},
|
||||
'@nativescript/webpack/transformers/ns-transform-native-classes': emptyObject,
|
||||
'@nativescript/webpack/utils/ast-utils': {
|
||||
getMainModulePath: () => {
|
||||
return 'fakePath';
|
||||
@@ -78,6 +79,7 @@ const webpackConfigAngular = proxyquire('./webpack.angular', {
|
||||
const webpackConfigTypeScript = proxyquire('./webpack.typescript', {
|
||||
'@nativescript/webpack': nativeScriptDevWebpack,
|
||||
'@nativescript/webpack/nativescript-target': emptyObject,
|
||||
'@nativescript/webpack/transformers/ns-transform-native-classes': emptyObject,
|
||||
'@nativescript/webpack/utils/tsconfig-utils': {
|
||||
getNoEmitOnErrorFromTSConfig: () => {
|
||||
return false;
|
||||
@@ -98,6 +100,7 @@ const webpackConfigJavaScript = proxyquire('./webpack.javascript', {
|
||||
const webpackConfigVue = proxyquire('./webpack.vue', {
|
||||
'@nativescript/webpack': nativeScriptDevWebpack,
|
||||
'@nativescript/webpack/nativescript-target': emptyObject,
|
||||
'@nativescript/webpack/transformers/ns-transform-native-classes': emptyObject,
|
||||
'vue-loader/lib/plugin': EmptyClass,
|
||||
'nativescript-vue-template-compiler': emptyObject,
|
||||
'terser-webpack-plugin': TerserJsStub,
|
||||
|
||||
@@ -5,6 +5,7 @@ const webpack = require("webpack");
|
||||
const nsWebpack = require("@nativescript/webpack");
|
||||
const nativescriptTarget = require("@nativescript/webpack/nativescript-target");
|
||||
const { getNoEmitOnErrorFromTSConfig } = require("@nativescript/webpack/utils/tsconfig-utils");
|
||||
const nsTransformNativeClasses = require("@nativescript/webpack/transformers/ns-transform-native-classes").default;
|
||||
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||
@@ -246,7 +247,10 @@ module.exports = env => {
|
||||
compilerOptions: {
|
||||
sourceMap: isAnySourceMapEnabled,
|
||||
declaration: false
|
||||
}
|
||||
},
|
||||
getCustomTransformers: (program) => ({
|
||||
before: [nsTransformNativeClasses]
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
@@ -11,6 +11,7 @@ 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();
|
||||
|
||||
@@ -264,7 +265,10 @@ module.exports = env => {
|
||||
allowTsInNodeModules: true,
|
||||
compilerOptions: {
|
||||
declaration: false
|
||||
}
|
||||
},
|
||||
getCustomTransformers: (program) => ({
|
||||
before: [nsTransformNativeClasses]
|
||||
})
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user