diff --git a/src/main.js b/src/main.js index 6b2c2ee..0defbf3 100644 --- a/src/main.js +++ b/src/main.js @@ -11,12 +11,14 @@ export default function preprocess(opts) { const state = { failedIf: false } - const parse = this.parse + const parse = opts.parser ?? this.parse + const rollupThis = this const comments = [] const ast = recast.parse(code, { - parser: this + parser: { parse } }) + walk(ast, { //WALK CST FOR COMPTIME_VARS enter(node, parent, prop, index) { if (parent?.type === "MemberExpression" && parent?.property === node) {