{"id":23134382,"url":"https://github.com/vmlweb/ts-loader-declaration","last_synced_at":"2026-05-05T12:32:27.567Z","repository":{"id":57380887,"uuid":"85854583","full_name":"Vmlweb/TS-Loader-Declaration","owner":"Vmlweb","description":"Generates bundled Webpack Typescript declaration from exports.","archived":false,"fork":false,"pushed_at":"2017-12-01T08:29:29.000Z","size":27,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-13T04:20:29.624Z","etag":null,"topics":["bundler","decleration","merge","ts-loader","typescript","webpack"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ts-loader-decleration","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vmlweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-22T17:03:36.000Z","updated_at":"2020-11-25T14:40:54.000Z","dependencies_parsed_at":"2022-09-26T16:41:17.726Z","dependency_job_id":null,"html_url":"https://github.com/Vmlweb/TS-Loader-Declaration","commit_stats":null,"previous_names":["vmlweb/ts-loader-decleration"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vmlweb%2FTS-Loader-Declaration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vmlweb%2FTS-Loader-Declaration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vmlweb%2FTS-Loader-Declaration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vmlweb%2FTS-Loader-Declaration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vmlweb","download_url":"https://codeload.github.com/Vmlweb/TS-Loader-Declaration/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142411,"owners_count":20890723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bundler","decleration","merge","ts-loader","typescript","webpack"],"created_at":"2024-12-17T12:10:18.239Z","updated_at":"2026-05-05T12:32:27.526Z","avatar_url":"https://github.com/Vmlweb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TS Loader Decleration\n\nGenerates bundled Webpack Typescript declarations from exports.\n\nInspired by [declaration-bundler-webpack-plugin](https://www.npmjs.com/package/declaration-bundler-webpack-plugin).\n\n## Installation\n\nYou can grab the latest version via NPM.\n\n```bash\nnpm install --save-dev ts-loader-decleration\n```\n\n## Configuration\n\nFirst ensure `declaration: true` is set in your `tsconfig.json` for declaration files to be generated.\n\nFinally include the plugin in your Webpack configuration.\n\n```javascript\nconst path = require('path')\nconst webpack = require('webpack')\nconst JavaScriptObfuscator = require('webpack-obfuscator')\nconst nodeExternals = require('webpack-node-externals')\nconst { TSDeclerationsPlugin } = require('ts-loader-decleration')\n\nmodule.exports = {\n\tentry: {\n\t\tmain: './src/index.ts',\n\t\tother: './src/other.ts'\n\t},\n\ttarget: 'node',\n\tresolve: {\n\t\textensions: ['.ts', '.js']\n\t},\n\texternals: [\n\t\tnodeExternals()\n\t],\n\toutput: {\n\t\tfilename: './index.js',\n\t\tlibraryTarget: \"commonjs\"\n\t},\n\tplugins: [\n\t\tnew TSDeclerationsPlugin({\n\t\t\tmain: 'main'\n\t\t}),\n\t\tnew webpack.optimize.UglifyJsPlugin(),\n\t\tnew JavaScriptObfuscator({\n\t\t\tdisableConsoleOutput: false\n\t\t}),\n    ],\n\tmodule: {\n\t\trules: [{\n\t\t\ttest: /\\.ts$/,\n\t\t\tloader: 'ts-loader',\n\t\t\texclude: /(node_modules|bower_components)/\n\t\t}]\n\t}\n}\n```\n\nOnly modules exported from your entry file will be included in the bundled declaration.\n\n## Awesome Typescript Loader\n\nWhen using AWS there is an issue where imports will not be included in the declaration bundle unless it has been used literally. There is a loader included to patch this issue.\n\n```javascript\n{\n\ttest: /\\.ts$/,\n\tuse: [{\n\t\tloader: 'awesome-typescript-loader',\n\t\tquery: {\n\t\t\tdeclaration: true,\n\t\t\t//...\n\t\t}\n\t}, {\n\t\tloader: 'ts-loader-decleration'\n\t}]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmlweb%2Fts-loader-declaration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvmlweb%2Fts-loader-declaration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmlweb%2Fts-loader-declaration/lists"}