<commit_before>const configurator = require("@nteract/webpack-configurator");
const LodashModuleReplacementPlugin = require("lodash-webpack-plugin");
const webpack = require("webpack");
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");

const babelTypescriptConfig = require("../../../babel.typescript.config");

const nodeEnv = process.env.NODE_ENV || "development";
const isProd = nodeEnv === "production";

const ASSET_PATH = process.env.ASSET_PATH || "/nteract/static/dist";

module.exports = {
  externals: ["canvas"],
  mode: isProd ? "production" : "development",
  devtool: isProd ? "hidden-source-map" : "cheap-eval-source-map",
  entry: {
    app: "./app/index.tsx"
  },
  devServer: isProd
    ? {}
    : {
        hot: true,
        headers: { "Access-Control-Allow-Origin": "*" }
      },
  target: "web",
  output: {
    // Note: this gets overriden by our use of __webpack_public_path__ later
    publicPath: ASSET_PATH,
    chunkFilename: "[name]-[chunkhash].bundle.js"
  },
  module: {
    rules: [
      {
        test: /\.css$/,
        use: ["style-loader", "css-loader"]
      },
      {
        test: /\.tsx?$/,
        exclude: configurator.exclude,
        loader: "babel-loader",
        options: babelTypescriptConfig()
      }
    ]
  },
  resolve: {
    mainFields: ["nteractDesktop", "module", "main"],
    extensions: [".ts", ".tsx", ".js"],
    alias: configurator.mergeDefaultAliases()
  },
  plugins: [
    new LodashModuleReplacementPlugin(),
    new webpack.DefinePlugin({
      "process.env.ASSET_PATH": JSON.stringify(ASSET_PATH)
    }),
    //new webpack.IgnorePlugin(/\.(css|less)$/),
    new MonacoWebpackPlugin(),

    new webpack.IgnorePlugin(<commit_msg>switch jext to ts-loader<commit_after>const configurator = require("@nteract/webpack-configurator");
const LodashModuleReplacementPlugin = require("lodash-webpack-plugin");
const webpack = require("webpack");
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");

const nodeEnv = process.env.NODE_ENV || "development";
const isProd = nodeEnv === "production";

const ASSET_PATH = process.env.ASSET_PATH || "/nteract/static/dist";

const tsLoaderConfig = {
  loader: "ts-loader",
  options: {
    transpileOnly: true,
    compilerOptions: {
      noEmit: false
    }
  }
};

module.exports = {
  externals: ["canvas"],
  mode: isProd ? "production" : "development",
  devtool: isProd ? "hidden-source-map" : "cheap-eval-source-map",
  entry: {
    app: "./app/index.tsx"
  },
  devServer: isProd
    ? {}
    : {
        hot: true,
        headers: { "Access-Control-Allow-Origin": "*" }
      },
  target: "web",
  output: {
    // Note: this gets overriden by our use of __webpack_public_path__ later
    publicPath: ASSET_PATH,
    chunkFilename: "[name]-[chunkhash].bundle.js"
  },
  module: {
    rules: [
      {
        test: /\.css$/,
        use: ["style-loader", "css-loader"]
      },
      {
        test: /\.tsx?$/,
        use: [tsLoaderConfig]
      }
    ]
  },
  resolve: {
    mainFields: ["nteractDesktop", "module", "main"],
    extensions: [".ts", ".tsx", ".js"],
    alias: configurator.mergeDefaultAliases()
  },
  plugins: [
    new LodashModuleReplacementPlugin(),
    new webpack.DefinePlugin({
      "process.env.ASSET_PATH": JSON.stringify(ASSET_PATH)
    }),
    //new webpack.IgnorePlugin(/\.(css|less)$/),
    new MonacoWebpackPlugin(),

    new webpack.IgnorePlugin(
{'fraction_non_alphanumeric': 0.1645274212368728, 'fraction_numerical': 0.0, 'mean_word_length': 3.0724465558194773, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1373227', 'n_tokens_mistral': 1157, 'n_tokens_neox': 1134, 'n_words': 211}