Do I use the experimental plugin wrong or is it not working for the case below (compared to the rollup one)
Example / Demo
Config:
import type { RolldownOptions } from 'rolldown'
import rollupReplacePlugin from '@rollup/plugin-replace'
import { replacePlugin } from 'rolldown/experimental'
const config: RolldownOptions = {
input: './src/index.ts',
plugins: [
replacePlugin({
__rolldown: '0'
}),
rollupReplacePlugin({
__rollup: '1',
preventAssignment: true
})
]
}
export default config
// index.ts
// @ts-ignore
console.log(__rollup, __rolldown)
Expected output:
console.log(1, 0);
Actual:
console.log(1, __rolldown);