{"id":16235878,"url":"https://github.com/lukethacoder/lwc-webpack-plugin","last_synced_at":"2025-04-08T08:25:09.551Z","repository":{"id":154830249,"uuid":"632426319","full_name":"lukethacoder/lwc-webpack-plugin","owner":"lukethacoder","description":"⚡ An opinionated Webpack plugin for LWC","archived":false,"fork":false,"pushed_at":"2024-04-04T00:49:55.000Z","size":212,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T12:16:11.765Z","etag":null,"topics":["lightning-web-components","lwc","salesforce","webpack"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/@lukethacoder/lwc-webpack-plugin","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukethacoder.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-25T11:38:14.000Z","updated_at":"2024-02-25T23:37:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"db679300-b8ed-433b-975a-32f45a598a79","html_url":"https://github.com/lukethacoder/lwc-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukethacoder%2Flwc-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukethacoder%2Flwc-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukethacoder%2Flwc-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukethacoder%2Flwc-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukethacoder","download_url":"https://codeload.github.com/lukethacoder/lwc-webpack-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247802650,"owners_count":20998629,"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":["lightning-web-components","lwc","salesforce","webpack"],"created_at":"2024-10-10T13:27:59.848Z","updated_at":"2025-04-08T08:25:09.528Z","avatar_url":"https://github.com/lukethacoder.png","language":"TypeScript","readme":"# lwc-webpack-plugin\n\n⚡ An opinionated Webpack plugin for LWC based on the official [`@salesforce/lwc-webpack-plugin`](https://github.com/salesforce/lwc-webpack-plugin).\n\nThis plugin allows you to use LWC within any web framework project that uses Webpack.\n\n## Updates\n\nA list of changes and additions to the official [`@salesforce/lwc-webpack-plugin`](https://github.com/salesforce/lwc-webpack-plugin) plugin.\n\n- Adds support for namespaces and multi directory modules (as per [@lukethacoder/lwc-module-resolver](https://github.com/lukethacoder/lwc-module-resolver))\n- Adds support for `rootDir`, instead of defaulting to `process.cwd()`\n\n## Install\n\n```\npnpm add -D @lukethacoder/lwc-webpack-plugin @lukethacoder/lwc-module-resolver lwc\n```\n\nNote that you must install your own dependencies for `lwc` and `@lukethacoder/lwc-module-resolver`.\n\n## Usage\n\n```javascript\nconst LwcWebpackPlugin = require('@lukethacoder/lwc-webpack-plugin')\n\nmodule.exports = {\n  plugins: [new LwcWebpackPlugin()]\n}\n```\n\nThe above example assumes that you have configured LWC modules via `lwc.config.json` in your project root, or as `lwc` key in your `package.json`.\n\nPass the `module` configuration as parameter to the plugin, if you prefer to not use any of the above mentioned LWC module configuration options.\n\n```javascript\nconst LwcWebpackPlugin = require('@lukethacoder/lwc-webpack-plugin')\n\nmodule.exports = {\n  plugins: [\n    new LwcWebpackPlugin({\n      rootDir: './my-cool-project',\n      modules: [\n        {\n          dirs: [\n            './shared/main/default/lwc',\n            './project1/main/default/lwc',\n            './project2/main/default/lwc',\n          ],\n          namespace: 'c',\n        },\n        { npm: 'lwc-recipes-oss-ui-components' },\n        { npm: 'lightning-base-components' }\n      ]\n    })\n  ]\n}\n```\n\nThe plugin takes also three additional configuration options:\n\n- `rootDir` - defaults to `process.cmd()`\n- `stylesheetConfig`\n- `outputConfig`\n\nThese options are 1:1 mappings of the LWC Compiler options, which are documented [here](https://github.com/salesforce/lwc/tree/master/packages/%40lwc/compiler#apis).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukethacoder%2Flwc-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukethacoder%2Flwc-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukethacoder%2Flwc-webpack-plugin/lists"}