Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ssigwart/webpack-typescript-directory-compile-plugin
Webpack plugin to take a source directory of typescript files and compile them to a destination directory of javascript files.
https://github.com/ssigwart/webpack-typescript-directory-compile-plugin
Last synced: about 2 months ago
JSON representation
Webpack plugin to take a source directory of typescript files and compile them to a destination directory of javascript files.
- Host: GitHub
- URL: https://github.com/ssigwart/webpack-typescript-directory-compile-plugin
- Owner: ssigwart
- License: mit
- Created: 2022-01-11T03:36:45.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-11T03:59:09.000Z (about 3 years ago)
- Last Synced: 2024-02-25T01:38:13.282Z (11 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This Webpack plugin takes a source directory of typescript files and compiles them to a destination directory.
## Including Package
```bash
npm install @ssigwart/webpack-typescript-directory-compile-plugin --save-dev
```## Example Usage
```js
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
]
};
```