github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ui/cypress/plugins/cy-ts-preprocessor.js (about)

     1  // Copyright 2020 The Cockroach Authors.
     2  //
     3  // Use of this software is governed by the Business Source License
     4  // included in the file licenses/BSL.txt.
     5  //
     6  // As of the Change Date specified in that file, in accordance with
     7  // the Business Source License, use of this software will be governed
     8  // by the Apache License, Version 2.0, included in the file
     9  // licenses/APL.txt.
    10  
    11  const wp = require('@cypress/webpack-preprocessor');
    12  
    13  const webpackOptions = {
    14    resolve: {
    15      extensions: ['.ts', '.js']
    16    },
    17    module: {
    18      rules: [
    19        {
    20          test: /\.ts$/,
    21          exclude: [/node_modules/],
    22          use: [
    23            {
    24              loader: 'ts-loader'
    25            }
    26          ]
    27        }
    28      ]
    29    }
    30  };
    31  
    32  const options = {
    33    webpackOptions
    34  };
    35  
    36  module.exports = wp(options);