{"id":18609722,"url":"https://github.com/unlight/static-import-webpack-plugin","last_synced_at":"2025-11-02T20:30:28.469Z","repository":{"id":57370097,"uuid":"203461041","full_name":"unlight/static-import-webpack-plugin","owner":"unlight","description":"Duck taped solution to move static imports in webpack bundle to top level by using special comment","archived":false,"fork":false,"pushed_at":"2019-08-31T21:47:35.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-25T18:02:01.270Z","etag":null,"topics":["ecmascript-import","static-import","webpack-plugin"],"latest_commit_sha":null,"homepage":"","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/unlight.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-08-20T22:02:58.000Z","updated_at":"2019-08-31T21:48:41.000Z","dependencies_parsed_at":"2022-09-16T22:50:46.674Z","dependency_job_id":null,"html_url":"https://github.com/unlight/static-import-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fstatic-import-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fstatic-import-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fstatic-import-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unlight%2Fstatic-import-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unlight","download_url":"https://codeload.github.com/unlight/static-import-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239400596,"owners_count":19632049,"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":["ecmascript-import","static-import","webpack-plugin"],"created_at":"2024-11-07T03:07:03.956Z","updated_at":"2025-11-02T20:30:28.417Z","avatar_url":"https://github.com/unlight.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# static-import-webpack-plugin\nDuck taped solution to move static imports in webpack bundle to top level \nby using special comment `/* webpackIgnore: true */`.  \nWith combination [esm-webpack-plugin](https://github.com/purtuga/esm-webpack-plugin) allow to generate EcmaScript module.  \nSee example at https://github.com/unlight/webhive/tree/microfrontend/src/webhive.frontend\n\n## Install\n```sh\nnpm install --save-dev static-import-webpack-plugin\n```\n\n## Usage\n\n### Webpack Config\n```js\nconst StaticImportWebpackPlugin = require('static-import-webpack-plugin');\n// Add to plugins array\nplugins: [\n    new StaticImportWebpackPlugin(),\n],\n// Other config settings\nentry: './src/entry.js',\noutput: {\n    libraryTarget: 'var',\n    library: '$lib',\n}\n```\n\n### Code\n```js\n// /src/unicorn.js\nexport default 'unicorn'\n```\n```js\n// /src/entry.js\nimport pokemon /* webpackIgnore: true */ from './pokemon';\nimport unicorn from './unicorn';\n```\n\n### Output\n```\nimport pokemon from './pokemon';\nvar $lib = ... // webpackBootstrap + bundled unicorn\n```\n\n## Related Projects\n- https://github.com/purtuga/esm-webpack-plugin\n\n## Development\n\n### Example\n```sh\nnpx ts-node node_modules/webpack/bin/webpack.js --config example/webpack.config.js\n```\n```\nnode --inspect-brk c:/nodejs/node_modules/ts-node/dist/bin.js node_modules/webpack/bin/webpack.js --config example/webpack.config.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funlight%2Fstatic-import-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funlight%2Fstatic-import-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funlight%2Fstatic-import-webpack-plugin/lists"}