1.0.18 • Published 5 years ago

ts-loader-import v1.0.18

Weekly downloads
4
License
MIT
Repository
github
Last release
5 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

5 years ago

2.0.3

5 years ago

2.3.3

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.12

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago