Closed radium-v closed 4 years ago
Hello! I came across this package and really appreciate the work put into it.
Our source templates are in Typescript files which use decorators, and the Babel Parser throws errors since we can't set config options.
By adding a parserOptions property and passing it to the parser, I can get working results:
parserOptions
const { parserOptions = {}, tagsToProcess = [], transformer = code => code } = options; const ast = parse(content, parserOptions);
This would allow me to add the required options to my rollup:
... plugins: [ transformTaggedTemplate({ parserOptions: { sourceType: "module", plugins: [ "typescript", [ "decorators", { decoratorsBeforeExport: true } ] ] }, tagsToProcess: ['html'], transformer: transformHTMLTaggedTemplate }), ...
I'd be happy to submit a pull request both here and for rollup-plugin-minify-tagged-css-template to add this option.
rollup-plugin-minify-tagged-css-template
Hello! I came across this package and really appreciate the work put into it.
Our source templates are in Typescript files which use decorators, and the Babel Parser throws errors since we can't set config options.
By adding a
parserOptions
property and passing it to the parser, I can get working results:This would allow me to add the required options to my rollup:
I'd be happy to submit a pull request both here and for
rollup-plugin-minify-tagged-css-template
to add this option.