webpack-plugin-noop-ts

webpack plugin for typescript that does nothing

Usage no npm install needed!

<script type="module">
  import webpackPluginNoopTs from 'https://cdn.skypack.dev/webpack-plugin-noop-ts';
</script>

README

webpack-plugin-noop-ts

npm

webpack plugin for typescript that does nothing, fork from https://github.com/QingWei-Li/noop-webpack-plugin

Installation

# npm
npm i -D webpack-plugin-noop-ts
# yarn
yarn add -D webpack-plugin-noop-ts

Usage

import { Configuration } from 'webpack';
import NoopWebpackPlugin from 'webpack-plugin-noop-ts';

const webpackConfig = (): Configuration => {
    const isWebpackDev = process.env.NODE_ENV === 'development';

    return {
        // your config
        plugins: [...[isWebpackDev ? new YourPlugin() : NoopWebpackPlugin()]],
    };
};

License

MIT