Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[email protected] breaks our JSX fragments #13

Open
pdfabbro opened this issue Jan 18, 2023 · 4 comments
Open

[email protected] breaks our JSX fragments #13

pdfabbro opened this issue Jan 18, 2023 · 4 comments
Assignees

Comments

@pdfabbro
Copy link

Hi There,

Based on this issue babel/babel#15353 (comment) the mithril documentation found here needs an update https://mithril.js.org/jsx.html. The single quotes should be removed from around the bracket. My working file is as follows:

module.exports = {
	presets: ["@babel/preset-env"],
	plugins: [
		"@babel/plugin-proposal-object-rest-spread",
		["babel-plugin-root-import", { rootPathSuffix: "src" }],
		[
			"@babel/plugin-transform-react-jsx",
			{
				pragma: "m",
				pragmaFrag: "["
			}
		]
	],
	sourceMaps: true,
	retainLines: true,
	env: {
		test: {
			plugins: ["@babel/plugin-transform-modules-commonjs"]
		}
	}
};
@pygy
Copy link
Member

pygy commented Jan 18, 2023

Thanks for the heads up @pdfabbro. Let's wait for babel/babel#15353 to settle before we act on this.

@pygy
Copy link
Member

pygy commented Jan 24, 2023

They'll be reverting the breaking change. They haven't committed yet to enshrine passing a string there. I'll ping them again in a few days (if I forget, please ping me here).

@pygy pygy changed the title Mithril documentation needs an update [email protected] breaks our JSX fragments Jan 25, 2023
@pygy
Copy link
Member

pygy commented Jan 26, 2023

It turns out we already have m.Fragment = '[' defined... I've been out of the loop and didn't know about it.

@dead-claudia
Copy link
Member

Transferring to the docs repo so the docs are more likely to get fixed.

@dead-claudia dead-claudia transferred this issue from MithrilJS/mithril.js Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants