Skip to content

Commit

Permalink
chore(rollup): change constant 'aliasEntries' to 'entries'
Browse files Browse the repository at this point in the history
  • Loading branch information
sukvvon committed Jan 7, 2025
1 parent ef38224 commit 89173fb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import esbuild from 'rollup-plugin-esbuild'

const extensions = ['.js', '.ts', '.tsx']
const { root } = path.parse(process.cwd())
const aliasEntries = [
export const entries = [
{ find: /.*\/vanilla\/shallow\.ts$/, replacement: 'zustand/vanilla/shallow' },
{ find: /.*\/react\/shallow\.ts$/, replacement: 'zustand/react/shallow' },
{ find: /.*\/vanilla\.ts$/, replacement: 'zustand/vanilla' },
Expand Down Expand Up @@ -51,7 +51,7 @@ function createESMConfig(input, output) {
external,
plugins: [
alias({
entries: aliasEntries.filter((entry) => !entry.find.test(input)),
entries: entries.filter((entry) => !entry.find.test(input)),
}),
resolve({ extensions }),
replace({
Expand Down Expand Up @@ -81,7 +81,7 @@ function createCommonJSConfig(input, output) {
external,
plugins: [
alias({
entries: aliasEntries.filter((entry) => !entry.find.test(input)),
entries: entries.filter((entry) => !entry.find.test(input)),
}),
resolve({ extensions }),
replace({
Expand All @@ -107,5 +107,3 @@ export default function (args) {
createESMConfig(`src/${c}.ts`, `dist/esm/${c}.mjs`),
]
}

export const entries = []

0 comments on commit 89173fb

Please sign in to comment.