Skip to content

Webpack plugin to take a source directory of typescript files and compile them to a destination directory of javascript files.

License

Notifications You must be signed in to change notification settings

Mahesh-Prem/webpack-typescript-directory-compile-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This Webpack plugin takes a source directory of typescript files and compiles them to a destination directory.

Including Package

npm install @ssigwart/webpack-typescript-directory-compile-plugin --save-dev

Example Usage

const path = require('path');
const { TypescriptDirectoryCompileWebpackPlugin } = require('@ssigwart/webpack-typescript-directory-compile-plugin');

const tsDirCompilePlugin = new TypescriptDirectoryCompileWebpackPlugin(path.resolve(__dirname, "./ts/web"), path.resolve(__dirname, "www/js"));

module.exports = {
	entry: tsDirCompilePlugin.getEntry(),
	output: {
		path: tsDirCompilePlugin.getOutputPath(),
		filename: "[name].js",
	},
	resolve: {
		extensions: [".ts"],
	},
	module: {
		rules: [
			{ test: /\.ts$/, loader: "ts-loader" },
		],
	},
	plugins: [
		tsDirCompilePlugin
	]
};

About

Webpack plugin to take a source directory of typescript files and compile them to a destination directory of javascript files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%