diff --git a/README.md b/README.md index 9cd95f9..618512d 100644 --- a/README.md +++ b/README.md @@ -103,10 +103,10 @@ The library uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) to Default Configuration (see `packages/react-app/src/cli/options.ts`): ```json { - appEntry: ".", - bootstrapModule: "@mocoding/react-app-basic", - outputClientPath: "./wwwroot", - outputServerPath: "./wwwroot_node", + "appEntry": ".", + "bootstrapModule": "@mocoding/react-app-basic", + "outputClientPath": "./wwwroot", + "outputServerPath": "./wwwroot_node", } ``` diff --git a/examples/extend-config/index.scss b/examples/extend-config/index.scss deleted file mode 100644 index d0d1775..0000000 --- a/examples/extend-config/index.scss +++ /dev/null @@ -1,10 +0,0 @@ -body { - background-color: #ccc; - width: 100%; - text-align: center; - - img{ - margin: 0 auto; - display: block; - } -} diff --git a/examples/extend-config/index.tsx b/examples/extend-config/index.tsx deleted file mode 100644 index 21d8637..0000000 --- a/examples/extend-config/index.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import * as React from "react"; -import "./index.scss"; - -export class App extends React.Component { - public render(): JSX.Element { - return
Extend config example
; - } -} diff --git a/examples/extend-config/webpack.client.config.js b/examples/extend-config/webpack.client.config.js deleted file mode 100644 index 2bfdbcf..0000000 --- a/examples/extend-config/webpack.client.config.js +++ /dev/null @@ -1,13 +0,0 @@ -// Change output name for server. -const config = { - optimization: { - splitChunks: { - cacheGroups: { - styles: { - name: "index", - }, - }, - }, - }, -}; -module.exports = config; diff --git a/examples/extend-config/webpack.server.config.js b/examples/extend-config/webpack.server.config.js deleted file mode 100644 index ca8fa00..0000000 --- a/examples/extend-config/webpack.server.config.js +++ /dev/null @@ -1,7 +0,0 @@ -// Change output name for server. -const config = { - output: { - filename: "render.js", - }, -}; -module.exports = config; diff --git a/examples/extend-config/wtb.json b/examples/extend-config/wtb.json deleted file mode 100644 index 508f0cb..0000000 --- a/examples/extend-config/wtb.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extend": { - "serverConfig": "./webpack.server.config.js", - "clientConfig": "./webpack.client.config.js" - } -} diff --git a/package.json b/package.json index c509b81..a1640d9 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,9 @@ "name": "mocoding-react-app-monorepo", "private": true, "devDependencies": { - "lerna": "^3.20.2", + "lerna": "^3.21.0", "redux-thunk": "^2.3.0", - "typescript": "^3.8.3" + "typescript": "^3.9.2" }, "workspaces": [ "packages/*" @@ -15,7 +15,10 @@ "scripts": { "cli": "moapp", "version": "lerna version --no-git-tag-version --yes", - "build": "yarn workspace @mocoding/react-app build" + "build": "yarn workspace @mocoding/react-app build", + "basic": "yarn cli serve --config examples/basic/.moapp.json", + "redux": "yarn cli serve --config examples/router-redux/.moapp.json", + "redux-async": "yarn cli serve --config examples/router-redux-async/.moapp.json" }, "eslintConfig": { "extends": "@mocoding/eslint-config" diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 7e01557..06324dd 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -16,14 +16,14 @@ "prettier.js" ], "dependencies": { - "@typescript-eslint/eslint-plugin": "^2.30.0", - "@typescript-eslint/parser": "^2.30.0", + "@typescript-eslint/eslint-plugin": "^2.33.0", + "@typescript-eslint/parser": "^2.33.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-only-warn": "^1.0.2", "eslint-plugin-prettier": "^3.1.3", - "eslint-plugin-react": "^7.19.0", - "eslint": "^6.8.0", + "eslint-plugin-react": "^7.20.0", + "eslint": "^7.0.0", "prettier": "^2.0.5", - "typescript": "^3.8.3" + "typescript": "^3.9.2" } } diff --git a/packages/react-app-common/components/body.tsx b/packages/react-app-common/components/body.tsx index 3dbc561..6f068a5 100644 --- a/packages/react-app-common/components/body.tsx +++ b/packages/react-app-common/components/body.tsx @@ -12,7 +12,7 @@ export class Body extends React.Component { public render(): React.ReactNode { const { scripts, markup, bodyAttrs } = this.props; - const type = process.env.SCRIPTS_TYPE || "module"; + const type = process.env.MOAPP_SCRIPTS_TYPE || "text/javascript"; const renderScripts = scripts.map((scriptSrc, i) => (