You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
545 B

import preprocess from "../src/main.js"
import { parse } from '@typescript-eslint/typescript-estree';
import { swc } from "rollup-plugin-swc3"
export default {
input: "./test.ts",
output: {
file: "out.js"
},
plugins: [
preprocess({
values: {
"COMPTIME_STR": "'Hello, world!'",
"COMPTIME_NUM": 2,
"IS_TRUE": 1,
"IS_FALSE": 0
},
transforms: {
"NONPROD": (node, parent, idx) => {parent.comments = []}
},
parser: parse
}),
swc({
jsc: {
parser: {
syntax: "typescript"
}
}
})
]
}