Use onLog to skip unknown directives warning (only for rollup 3)
The reason that keeps breaking is we're using a pretty unsafe operation to delete code based on swc node's span as it's already not recommended, which is only for getting rid of the roll warnings. We keep the original approach that we don't delete the code or comments anymore, but skipping the warnings from rollup side.
x-ref: https://github.com/huozhi/rollup-plugin-swc-preserve-directives/pull/4#issuecomment-1706551223
@swc/core
backonLog
to skip unknown directives warning (only for rollup 3)The reason that keeps breaking is we're using a pretty unsafe operation to delete code based on swc node's span as it's already not recommended, which is only for getting rid of the roll warnings. We keep the original approach that we don't delete the code or comments anymore, but skipping the warnings from rollup side.