Closed Onesimu closed 5 years ago
@Onesimu
Added pragma: 'preact' | 'mithril'
option. Please upgrade to version 1.0.72, try it out and let me know if it works.
https://github.com/bluewings/pug-as-jsx-loader/blob/14259e7809314738585858fd27e7e507c271d029/test/issues.js#L39-L48
Now I edit the source of pug-as-jsx-utils and change in the index.js line 167
result.useFragment ? "import React, { Fragment } from 'react';" : "import React from 'react';",
toresult.useFragment ? "import m, { Fragment } from 'mithril';" : "import m from 'mithril';",
it can work, but I think it's better to expose an option, like'@babel/plugin-transform-react-jsx', {"pragma": "m"}
it's more convenient and useful. May consider.