Skip to content
New issue

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

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

Already on GitHub? # to your account

babel@7.20.7 breaks our JSX fragments #2813

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

babel@7.20.7 breaks our JSX fragments #2813

pdfabbro opened this issue Jan 18, 2023 · 3 comments
Assignees
Labels
Area: Documentation For anything dealing mainly with the documentation itself Type: Bug For bugs and any other unexpected breakage

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"]
		}
	}
};
@pdfabbro pdfabbro added the Type: Bug For bugs and any other unexpected breakage label Jan 18, 2023
@dead-claudia dead-claudia added the Area: Documentation For anything dealing mainly with the documentation itself label Jan 18, 2023
@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 babel@7.20.7 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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area: Documentation For anything dealing mainly with the documentation itself Type: Bug For bugs and any other unexpected breakage
Projects
None yet
Development

No branches or pull requests

3 participants