webpack-ts-load
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

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

Package Sidebar

Install

npm i webpack-ts-load

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

40.4 kB

Total Files

45

Last publish

Collaborators

  • generalsimus