Skip to content

Commit

Permalink
Migrating the boilerplate to the new JSX Transform and minor changes …
Browse files Browse the repository at this point in the history
…in package.json and webpack. (#298)

* fix: react v17 new JSX Transform

* fix: minors package.json and webpack problems

* chore: include changeset
  • Loading branch information
EduSantosBrito authored Jun 27, 2021
1 parent 70226ef commit 0a485de
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/spicy-kiwis-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"generator-single-spa": minor
---

Minor changes in package.json and webpack. Migrate to the new JSX Transform with React 17
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"presets": [
"@babel/preset-env",<% if (framework === 'react') { %>
"@babel/preset-react",<% } if (typescript) { %>
[
"@babel/preset-react",
{
runtime: "automatic"
}
],<% } if (typescript) { %>
"@babel/preset-typescript"<% } %>
],
"plugins": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"jest-cli": "^26.6.3",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
"single-spa-react": "^4.0.0",
"webpack": "^5.8.0",
"webpack-cli": "^4.2.0",
"webpack-config-single-spa-react": "^2.0.0",
Expand All @@ -48,6 +47,7 @@
},
"dependencies": {
"react": "^17.0.1",
"react-dom": "^17.0.1"
"react-dom": "^17.0.1",
"single-spa-react": "^4.0.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from "react";

export default function Root(props) {
return <section>{props.name} is mounted!</section>;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import { render } from "@testing-library/react";
import Root from "./root.component";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { merge } = require("webpack-merge");
const { merge } = require("webpack-merge");
const singleSpaDefaults = require("webpack-config-single-spa-react<% if (typescript) { %>-ts<% } %>");

module.exports = (webpackConfigEnv, argv) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"eslint-config-important-stuff": "^1.1.0",
"eslint-config-prettier": "^7.0.0",
"eslint-plugin-prettier": "^3.2.0",
"html-webpack-plugin": "^5.3.1",
"husky": "^4.3.5",
"jest": "^26.6.3",
"jest-cli": "^26.6.3",
Expand Down

0 comments on commit 0a485de

Please sign in to comment.