├── .editorconfig ├── .gitattributes ├── .github ├── FUNDING.yml ├── renovate.json5 └── workflows │ ├── release-commit.yml │ ├── release.yml │ └── unit-test.yml ├── .gitignore ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── eslint.config.js ├── jsr.json ├── package.json ├── pnpm-lock.yaml ├── src ├── core │ └── options.ts ├── esbuild.ts ├── farm.ts ├── index.ts ├── rolldown.ts ├── rollup.ts ├── rspack.ts ├── vite.ts └── webpack.ts ├── tests ├── __snapshots__ │ ├── esbuild.test.ts.snap │ ├── rolldown.test.ts.snap │ ├── rollup.test.ts.snap │ ├── vite.test.ts.snap │ └── webpack.test.ts.snap ├── esbuild.test.ts ├── fixtures │ └── main.js ├── rolldown.test.ts ├── rollup.test.ts ├── vite.test.ts └── webpack.test.ts ├── tsconfig.json └── tsdown.config.ts /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/.editorconfig -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: sxzz 2 | -------------------------------------------------------------------------------- /.github/renovate.json5: -------------------------------------------------------------------------------- 1 | { 2 | extends: ['github>sxzz/renovate-config'], 3 | automerge: true, 4 | } 5 | -------------------------------------------------------------------------------- /.github/workflows/release-commit.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/.github/workflows/release-commit.yml -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/.github/workflows/release.yml -------------------------------------------------------------------------------- /.github/workflows/unit-test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/.github/workflows/unit-test.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | dist 4 | *.log 5 | .vercel 6 | .eslintcache 7 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/.vscode/settings.json -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/README.md -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/eslint.config.js -------------------------------------------------------------------------------- /jsr.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/jsr.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/package.json -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/pnpm-lock.yaml -------------------------------------------------------------------------------- /src/core/options.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/src/core/options.ts -------------------------------------------------------------------------------- /src/esbuild.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/src/esbuild.ts -------------------------------------------------------------------------------- /src/farm.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/src/farm.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/rolldown.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/src/rolldown.ts -------------------------------------------------------------------------------- /src/rollup.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/src/rollup.ts -------------------------------------------------------------------------------- /src/rspack.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/src/rspack.ts -------------------------------------------------------------------------------- /src/vite.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/src/vite.ts -------------------------------------------------------------------------------- /src/webpack.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/src/webpack.ts -------------------------------------------------------------------------------- /tests/__snapshots__/esbuild.test.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/tests/__snapshots__/esbuild.test.ts.snap -------------------------------------------------------------------------------- /tests/__snapshots__/rolldown.test.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/tests/__snapshots__/rolldown.test.ts.snap -------------------------------------------------------------------------------- /tests/__snapshots__/rollup.test.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/tests/__snapshots__/rollup.test.ts.snap -------------------------------------------------------------------------------- /tests/__snapshots__/vite.test.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/tests/__snapshots__/vite.test.ts.snap -------------------------------------------------------------------------------- /tests/__snapshots__/webpack.test.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/tests/__snapshots__/webpack.test.ts.snap -------------------------------------------------------------------------------- /tests/esbuild.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/tests/esbuild.test.ts -------------------------------------------------------------------------------- /tests/fixtures/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/tests/fixtures/main.js -------------------------------------------------------------------------------- /tests/rolldown.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/tests/rolldown.test.ts -------------------------------------------------------------------------------- /tests/rollup.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/tests/rollup.test.ts -------------------------------------------------------------------------------- /tests/vite.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/tests/vite.test.ts -------------------------------------------------------------------------------- /tests/webpack.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/tests/webpack.test.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/tsconfig.json -------------------------------------------------------------------------------- /tsdown.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unplugin/unplugin-replace/HEAD/tsdown.config.ts --------------------------------------------------------------------------------