
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@macro-plugin/webpack
Advanced tools
Macro Plugin integration for vite. It supports transform macros and typescript and also jsx.
# if you use npm
npm i -D @macro-plugin/webpack
# if you use pnpm
pnpm i -D @macro-plugin/webpack
# if you use yarn
yarn add -D @macro-plugin/webpack
webpack.config.js:
import { resolve } from "path"
/** @type { import("webpack").Configuration } */
export default {
mode: "production",
entry: resolve("./src/index.ts"),
output: {
path: resolve("./dist"),
filename: "index.js"
},
module: {
rules: [
{
test: /\.(t|j)sx?$/,
exclude: /node_modules/,
use: [
{
loader: "@macro-plugin/webpack"
}
]
}
]
}
}
It will load the configuration from macros.config.js or macros.config.ts by default. You can also customize it:
import { resolve } from "path"
/** @type { import("webpack").Configuration } */
export default {
mode: "production",
entry: resolve("./src/index.ts"),
output: {
path: resolve("./dist"),
filename: "index.js"
},
module: {
rules: [
{
test: /\.(t|j)sx?$/,
exclude: /node_modules/,
use: [
{
loader: "@macro-plugin/webpack",
/** @type { import("@macro-plugin/core").Config } */
options: {
emitDts: true
}
}
]
}
]
}
}
macros.config.ts:
import { defineConfig } from "@macro-plugin/core"
export default defineConfig({
macros: [],
emitDts: true,
jsc: {
parser: {
syntax: "typescript"
},
target: "esnext",
},
})
Or with commonjs
macros.config.js
/** @type {import("@macro-plugin/core").Config} */
module.exports = {
macros: [],
emitDts: true,
jsc: {
parser: {
syntax: "typescript"
},
target: "esnext",
},
}
MIT
FAQs
Macro plugins integration for webpack
We found that @macro-plugin/webpack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.