Visual studio 如何防止webpack用.js和.js.map文件污染我的文件夹?

Visual studio 如何防止webpack用.js和.js.map文件污染我的文件夹?,visual-studio,webpack,Visual Studio,Webpack,我最近为我编写的应用程序设置了webpack 这是我的配置: var path = require("path"); const statements = require('tsx-control-statements').default; const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); module.exports = { mode: "development", entry: {

我最近为我编写的应用程序设置了webpack

这是我的配置:

var path = require("path");
const statements = require('tsx-control-statements').default;

const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');

module.exports = {
    mode: "development",
    entry: {
        bundle: "./React/index.ts",
        logonBundle: "./React/logonIndex.ts",
        otherBundle: "./React/otherEntryPoint.ts",
    },
    output: {
        filename: "[name].js",
        path: path.resolve(__dirname, "wwwroot/dist/")
    },
    devtool: "eval-source-map",
    module: {
        rules: [
            {
                test: /\.less/,
                use: [
                    "style-loader",
                    "css-loader",
                    "less-loader",
                ],
            },
            {
                test: /\.tsx?$/,
                loader: "awesome-typescript-loader",
                exclude: /node_modules/,
                options: {
                    getCustomTransformers: () => ({ before: [statements()] })
                }
            }
        ]
    },
    resolve: {
        extensions: [".tsx", ".ts", ".js", ".jsx"],
        plugins: [new TsconfigPathsPlugin({configFile: "./tsconfig.json"})],
        modules: ["node_modules"]
    },
};
这工作得很好,但我不喜欢的是网页包如何用传输的文件污染我的文件夹

对于每个.ts和.tsx文件,我现在都有以下输出:

我怎样才能摆脱这个?或者,更好地说,我的配置哪里出了问题?我确信这与源地图有关,但我不知道如何绕过它


编辑:非常有趣的是。。。这只在我从VisualStudio构建时发生。直接通过CLI构建时不会发生这种情况。

问题不是webpack,而是Visual Studio

事实证明,我的VS本身也做了一些构建。我补充说

<PropertyGroup>
    <TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
</PropertyGroup>

最新的
到我的csproj,现在它不再污染我的文件夹了