|
|
@ -11,12 +11,14 @@ export default function preprocess(opts) {
|
|
|
|
const state = {
|
|
|
|
const state = {
|
|
|
|
failedIf: false
|
|
|
|
failedIf: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const parse = this.parse
|
|
|
|
const parse = opts.parser ?? this.parse
|
|
|
|
|
|
|
|
const rollupThis = this
|
|
|
|
|
|
|
|
|
|
|
|
const comments = []
|
|
|
|
const comments = []
|
|
|
|
const ast = recast.parse(code, {
|
|
|
|
const ast = recast.parse(code, {
|
|
|
|
parser: this
|
|
|
|
parser: { parse }
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
walk(ast, { //WALK CST FOR COMPTIME_VARS
|
|
|
|
walk(ast, { //WALK CST FOR COMPTIME_VARS
|
|
|
|
enter(node, parent, prop, index) {
|
|
|
|
enter(node, parent, prop, index) {
|
|
|
|
if (parent?.type === "MemberExpression" && parent?.property === node) {
|
|
|
|
if (parent?.type === "MemberExpression" && parent?.property === node) {
|
|
|
|