0.1.1 • Published 1 year ago

webpack-ts-load v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Webpack Typescript Loader

npm version npm href

webpack.config

const path = require('path');

module.exports = {
  entry: './src/index.ts',
  module: {
    rules: [
      {
        test: /\.(((t|j)sx?)|json)$/i,
        exclude: path.resolve(__dirname, "node_modules"),
        use: [
          {
            loader: "webpack-ts-load",
            options: {
              compilerOptions,  // ts.CompilerOptions 
              tsConfigPath      // tsConfig file name
              transforms,       // ts.CustomTransformers
            },
          },
        ],
      }
    ],
  },
  resolve: {
    extensions: ['.tsx', '.ts', '.js'],
  },
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname, 'dist'),
  },
};

License

MIT