Skip to content

feat: add webpack support - #381

Merged
hannoeru merged 2 commits into
mainfrom
hannoeru/webpack-support
Sep 7, 2026
Merged

hannoeru merged 2 commits into
mainfrom
hannoeru/webpack-support

Conversation

@hannoeru

Copy link
Copy Markdown
Member

Summary

  • document the swc.webpack() adapter
  • add Webpack 5 as a development dependency
  • add a Webpack Node API integration test for TypeScript transformation, tsconfig target handling, and extensionless imports

Validation

  • pnpm test --run
  • pnpm lint
  • pnpm type-check
  • pnpm build

Closes #94

Copilot AI lite review requested due to automatic review settings August 13, 2026 03:49
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@socket-security

socket-security Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedwebpack@​5.110.3931009399100

View full report

@socket-security

socket-security Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@hannoeru hannoeru mentioned this pull request Aug 13, 2026
3 tasks done

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Webpack support to the unplugin-swc package by documenting the swc.webpack() adapter, introducing Webpack 5 as a dev dependency, and adding an integration test that exercises Webpack’s Node API with TS transform + tsconfig target handling + extensionless relative imports.

Changes:

  • Document swc.webpack() usage in README.md and clarify minification support limitations.
  • Add a Webpack Node API integration test and corresponding fixture sources/tsconfig.
  • Add webpack as a dev dependency (and update lockfile).

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/index.test.ts Adds a Webpack integration test that builds a TS entry and asserts TS syntax is removed and target transforms apply.
test/fixtures/webpack/tsconfig.json Provides a fixture tsconfig with target: es5 to validate target handling.
test/fixtures/webpack/message.ts Fixture TS module containing a type annotation to validate stripping.
test/fixtures/webpack/index.ts Fixture TS entry using extensionless import and optional chaining to validate resolution + downleveling.
README.md Documents Webpack usage and clarifies minification behavior across bundlers.
package.json Adds Webpack 5 as a development dependency.
pnpm-lock.yaml Updates lockfile to include Webpack and new transitive dependencies.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/index.test.ts Outdated
Comment thread README.md
@hannoeru
hannoeru force-pushed the hannoeru/webpack-support branch 4 times, most recently from 05dc38d to 81fe937 Compare August 16, 2026 14:33
@hannoeru
hannoeru force-pushed the hannoeru/webpack-support branch from 81fe937 to f6f398e Compare September 1, 2026 14:04
@hannoeru
hannoeru force-pushed the hannoeru/webpack-support branch from f6f398e to 417791a Compare September 7, 2026 13:13
@hannoeru
hannoeru merged commit 55ca335 into main Sep 7, 2026
6 checks passed
@hannoeru
hannoeru deleted the hannoeru/webpack-support branch September 7, 2026 13:15
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is it possible to support webpack

2 participants