mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
replace React imports with automatic JSX runtime and add swc.config.ts templates for TypeScript and Tailwind skeletons
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import React from 'react';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { App } from '/imports/ui/App';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from 'react';
|
||||
import { Hello } from './Hello';
|
||||
import { Info } from './Info';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react';
|
||||
import { useState } from 'react';
|
||||
|
||||
export const Hello = () => {
|
||||
const [counter, setCounter] = useState(0);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { useFind, useSubscribe } from "meteor/react-meteor-data/suspense";
|
||||
import { LinksCollection } from "../api/links";
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
"@rsdoctor/rspack-plugin": "^1.2.3",
|
||||
"@rspack/cli": "^1.7.1",
|
||||
"@rspack/core": "^1.7.1",
|
||||
"@swc/core": "^1.15.18",
|
||||
"@rspack/plugin-react-refresh": "^1.4.3",
|
||||
"@tailwindcss/postcss": "^4.1.12",
|
||||
"@types/meteor": "^2.9.9",
|
||||
|
||||
13
tools/static-assets/skel-typescript-tailwind/swc.config.ts
Normal file
13
tools/static-assets/skel-typescript-tailwind/swc.config.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { Config } from "@swc/core";
|
||||
|
||||
const config: Config = {
|
||||
jsc: {
|
||||
transform: {
|
||||
react: {
|
||||
runtime: "automatic",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"jsc": {
|
||||
"transform": {
|
||||
"react": {
|
||||
"runtime": "automatic"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@
|
||||
"@rsdoctor/rspack-plugin": "^1.2.3",
|
||||
"@rspack/cli": "^1.7.1",
|
||||
"@rspack/core": "^1.7.1",
|
||||
"@swc/core": "^1.15.18",
|
||||
"@rspack/plugin-react-refresh": "^1.4.3",
|
||||
"@types/meteor": "^2.9.9",
|
||||
"@types/mocha": "^8.2.3",
|
||||
|
||||
13
tools/static-assets/skel-typescript/swc.config.ts
Normal file
13
tools/static-assets/skel-typescript/swc.config.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { Config } from "@swc/core";
|
||||
|
||||
const config: Config = {
|
||||
jsc: {
|
||||
transform: {
|
||||
react: {
|
||||
runtime: "automatic",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
Reference in New Issue
Block a user