title: How to resolve to a non default javascript file
body: <p>I am using webpack and typescript in my SPA along with the oidc-client npm package.</p>
  
  <p>which has a structure like this:</p>
  
  <ul>
  <li>oidc-client.d.ts</li>
  <li>oidc-client.js</li>
  <li>oidc-client.rsa256.js</li>
  </ul>
  
  <p>When I import the oidc-client in my typescript file as below:</p>
  
  <p><strong><em>import oidc from 'oidc-client';</em></strong></p>
  
  <p>I want to import the rsa256 version and not the standard version, but I am unsure how to do this.</p>
  
  <p>in my webpack config I have tried to use the resolve function but not I am not sure how to use this properly:</p>
  
  <pre><code>const path = require('path'); 
  const ForkTsChecker = require('fork-ts-checker-webpack-plugin');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
  const VueLoaderPlugin = require('vue-loader/lib/plugin');
  const FileManagerPlugin = require('filemanager-webpack-plugin');
  
  const shell = require('shelljs');
  
  const outputFolder = 'dist';
  const destinationFolder = '../SPA/content';
  
  if (shell.test('-d', outputFolder)) {
      shell.rm('-rf', `${outputFolder}`);
  }
  
  if (shell.test('-d', destinationFolder)) {
      shell.rm('-rf', `${destinationFolder}`);
  }
  
  module.exports = (env, options) =&gt; {
  //////////////////////////////////////
  /////////// HELP /////////////////////
  /////////////////////////////////////
  
    resolve: {
      oidc =  path.resolve(__dirname, 'node_modules\\oidc-client\\dist\\oidc-    client.rsa256.slim.min.js')
  
      };
  
      const legacy = GenerateConfig(options.mode, "legacy", { "browsers": "&gt; 0.5%, IE 11" });
  
      return [legacy];
  }
  
  function GenerateConfig(mode, name, targets) {
      return {
          entry: `./src/typescript/main.${name}.ts`,
          output: {
              filename: `main.${name}.js`,
              path: path.resolve(__dirname, `${outputFolder}`),
              publicPath: '/'
          },
          resolve: {
              extensions: ['.js', '.ts']
          },
          stats: {
              children: false
          },
          devtool: 'source-map',
          module: {
              rules: [
                  {
                      test: /\.ts\.html?$/i,
                      loader: 'vue-template-loader',
                  },
                  {
                      test: /\.vue$/i,
                      loader: 'vue-loader'
                  },
                  {  
                      test: /\.ts$/,
                      exclude: /node_modules/,
                      use: {
                          loader: 'babel-loader',
                          options: {
                              presets: [
                                  [
                                      '@babel/env',
                                      {
                                          "useBuiltIns": "usage",
                                          "corejs": { version: 3, proposals: true },
                                          "targets": targets
                                      }
                                  ],
                                  "@babel/typescript"
                              ],
                              plugins: [
                                  "@babel/transform-typescript",
                                  [
                                      "@babel/proposal-decorators",
                                      {
                                          "legacy": true
                                      }
                                  ],
                                      "@babel/plugin-proposal-optional-chaining",
                                  "@babel/plugin-proposal-nullish-coalescing-operator",
                                  "@babel/proposal-class-properties",
                                  "@babel/proposal-numeric-separator",
                                  "babel-plugin-lodash",
                                  ]
                      }
                  }
              }
          ]
      },
      devServer: {
          contentBase: path.join(__dirname, outputFolder),
          compress: true,
          hot: true,
          index: `index.${name}.html`,
          open: 'chrome'
      },
      plugins: [
          new ForkTsChecker({
              vue: true
          }), 
          new HtmlWebpackPlugin({
              filename: `index.${name}.html`,
              template: 'src/index.html',
              title: 'Project Name'
          }),
          new MiniCssExtractPlugin({ filename: 'app.css', hot: true }),
          new VueLoaderPlugin()
      ]
  };
  }
  </code></pre>
  
  <hr>