1.0.18 • Published 4 years ago

ts-loader-import v1.0.18

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

ts-loader-import

A plugin for customize import by ts-loader

Usage

with ts-loader

// webpack.config.js
const tsLoaderImportFactory = require("ts-loader-import")

module.exports = {
  // ...
  module: {
    rules: [
      {
        test: /\.(jsx|tsx|js|ts)$/,
        loader: "ts-loader",
        options: {
          transpileOnly: true,
          getCustomTransformers: () => ({
            before: [tsLoaderImportFactory(/** options */)],
          }),
          compilerOptions: {
            module: "es2015",
          },
        },
        exclude: /node_modules/,
      },
    ],
  },
  // ...
}
const tsLoaderImportFactory = require("ts-loader-import")
// with less
tsLoaderImportFactory({ style: true })
// with css
tsLoaderImportFactory({ style: "css" })
// without style
tsLoaderImportFactory()
1.0.18

4 years ago

2.0.3

4 years ago

2.3.3

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.12

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago