From 782db11c89af03544d0bb629e9fe3065da492c71 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 17 Feb 2023 15:05:31 +0100 Subject: [PATCH 1/6] hot module replacement --- apps/remix-ide/.babelrc | 2 +- apps/remix-ide/project.json | 9 ++++++--- apps/remix-ide/src/app.js | 1 - apps/remix-ide/tsconfig.app.json | 1 - babel.config.js | 2 +- libs/remix-core-plugin/package.json | 1 - libs/remix-core-plugin/tsconfig.lib.json | 5 ----- .../home-tab/src/lib/components/homeTabTitle.tsx | 1 - libs/remix-ws-templates/package.json | 1 - libs/remixd/tsconfig.lib.json | 2 +- package.json | 3 +++ 11 files changed, 12 insertions(+), 16 deletions(-) diff --git a/apps/remix-ide/.babelrc b/apps/remix-ide/.babelrc index 9123728aa1..34aaeb3268 100644 --- a/apps/remix-ide/.babelrc +++ b/apps/remix-ide/.babelrc @@ -1,5 +1,5 @@ { - "presets": ["@babel/preset-env", ["@babel/preset-react", + "presets": ["@babel/preset-env", ["@nrwl/react/babel", {"runtime": "automatic"} ]], "plugins": ["@babel/plugin-proposal-class-properties", "@babel/plugin-transform-runtime", "@babel/plugin-proposal-nullish-coalescing-operator"], diff --git a/apps/remix-ide/project.json b/apps/remix-ide/project.json index 7775e520c2..e118e366a7 100644 --- a/apps/remix-ide/project.json +++ b/apps/remix-ide/project.json @@ -48,15 +48,18 @@ "defaultConfiguration": "development", "options": { "buildTarget": "remix-ide:build", - "watch": true, - "liveReload": true, - "hmr": false + }, "configurations": { "development": { "buildTarget": "remix-ide:build:development", "port": 8080 }, + "hot":{ + "buildTarget": "remix-ide:build:development", + "port": 8080, + "hmr": true + }, "production": { "buildTarget": "remix-ide:build:production", "port": 8080 diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index d53d7ed75c..57a5140159 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -247,7 +247,6 @@ class AppComponent { const codeParser = new CodeParser(new AstWalker()) - this.notification = new NotificationPlugin() const configPlugin = new ConfigPlugin() diff --git a/apps/remix-ide/tsconfig.app.json b/apps/remix-ide/tsconfig.app.json index 499c767595..b45165141e 100644 --- a/apps/remix-ide/tsconfig.app.json +++ b/apps/remix-ide/tsconfig.app.json @@ -3,7 +3,6 @@ "compilerOptions": { "outDir": "../../dist/out-tsc", "types": ["node"], - "module": "es2020" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "./src/assets/**/*"], "include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"] diff --git a/babel.config.js b/babel.config.js index ad32f7a9d0..16d8ca5cea 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,5 +1,5 @@ module.exports = { - "presets": ["@babel/preset-typescript", "@babel/preset-env", "@babel/preset-react"], + "presets": ["@babel/preset-typescript", "@babel/preset-env", "@nrwl/react/babel"], "plugins": [ "babel-plugin-replace-ts-export-assignment", "@babel/plugin-transform-modules-commonjs", diff --git a/libs/remix-core-plugin/package.json b/libs/remix-core-plugin/package.json index 727b1981a8..3ea38618cc 100644 --- a/libs/remix-core-plugin/package.json +++ b/libs/remix-core-plugin/package.json @@ -3,7 +3,6 @@ "version": "0.0.1", "description": "This library was generated with [Nx](https://nx.dev).", "main": "src/index.js", - "type": "module", "author": "Remix Team", "license": "ISC" } diff --git a/libs/remix-core-plugin/tsconfig.lib.json b/libs/remix-core-plugin/tsconfig.lib.json index d1f4736244..87520f83f8 100644 --- a/libs/remix-core-plugin/tsconfig.lib.json +++ b/libs/remix-core-plugin/tsconfig.lib.json @@ -1,11 +1,6 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "module": "commonjs", - "outDir": "../../dist/out-tsc", - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "declaration": true, "types": ["node"] }, "exclude": [ diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx index 93808e3e00..e689c9c95d 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx @@ -52,7 +52,6 @@ function HomeTabTitle() { return (
-
Remix diff --git a/libs/remix-ws-templates/package.json b/libs/remix-ws-templates/package.json index 8f4058b563..f9a71a64dd 100644 --- a/libs/remix-ws-templates/package.json +++ b/libs/remix-ws-templates/package.json @@ -4,7 +4,6 @@ "description": "Create a Remix IDE workspace using different templates", "main": "src/index.js", "types": "src/index.d.ts", - "type": "module", "publishConfig": { "access": "public" }, diff --git a/libs/remixd/tsconfig.lib.json b/libs/remixd/tsconfig.lib.json index f367bc8051..c251b41e7e 100644 --- a/libs/remixd/tsconfig.lib.json +++ b/libs/remixd/tsconfig.lib.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "target": "es6", + "target": "ES6", "module": "commonjs", "outDir": "../../dist/out-tsc", "declaration": true, diff --git a/package.json b/package.json index 1bb34a3c05..b3c176c823 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "nx": "nx", "start": "nx start", "serve": "nx serve remix-ide --configuration=development", + "hot": "nx serve remix-ide --configuration=hot", "build": "nx build", "test": "nx test", "lint": "nx lint", @@ -234,6 +235,7 @@ "@nrwl/web": "15.7.1", "@nrwl/webpack": "15.7.1", "@nrwl/workspace": "^15.7.1", + "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", "@svgr/webpack": "^6.5.1", "@testing-library/react": "13.4.0", "@types/axios": "^0.14.0", @@ -332,6 +334,7 @@ "onchange": "^3.2.1", "os-browserify": "^0.3.0", "process": "^0.11.10", + "react-refresh": "^0.14.0", "react-test-renderer": "^17.0.2", "request": "^2.83.0", "rimraf": "^2.6.1", From 6ea2a50769c8db293d6830ab138ee5e721e505dd Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 17 Feb 2023 15:06:57 +0100 Subject: [PATCH 2/6] rm space --- apps/remix-ide/src/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 57a5140159..d53d7ed75c 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -247,6 +247,7 @@ class AppComponent { const codeParser = new CodeParser(new AstWalker()) + this.notification = new NotificationPlugin() const configPlugin = new ConfigPlugin() From e70e0f9582aee652ffb1938087b98add6716a5f8 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 17 Feb 2023 15:07:25 +0100 Subject: [PATCH 3/6] config --- libs/remixd/tsconfig.lib.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remixd/tsconfig.lib.json b/libs/remixd/tsconfig.lib.json index c251b41e7e..f367bc8051 100644 --- a/libs/remixd/tsconfig.lib.json +++ b/libs/remixd/tsconfig.lib.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "target": "ES6", + "target": "es6", "module": "commonjs", "outDir": "../../dist/out-tsc", "declaration": true, From e907e50beacdcf8561d842868f3776ee5c70456f Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 17 Feb 2023 15:08:31 +0100 Subject: [PATCH 4/6] tab --- libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx index e689c9c95d..93808e3e00 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx @@ -52,6 +52,7 @@ function HomeTabTitle() { return (
+
Remix From 32e744ba3f0b9a5bccfb01b96d1dd36498f4aaa5 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 17 Feb 2023 16:31:22 +0100 Subject: [PATCH 5/6] lock file --- yarn.lock | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index afada6be4f..89f000750b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5125,6 +5125,21 @@ dependencies: esquery "^1.0.1" +"@pmmmwh/react-refresh-webpack-plugin@^0.5.10": + version "0.5.10" + resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.10.tgz#2eba163b8e7dbabb4ce3609ab5e32ab63dda3ef8" + integrity sha512-j0Ya0hCFZPd4x40qLzbhGsh9TMtdb+CJQiso+WxLOPNasohq9cc5SNUcwsZaRH6++Xh91Xkm/xHCkuIiIu0LUA== + dependencies: + ansi-html-community "^0.0.8" + common-path-prefix "^3.0.0" + core-js-pure "^3.23.3" + error-stack-parser "^2.0.6" + find-up "^5.0.0" + html-entities "^2.1.0" + loader-utils "^2.0.4" + schema-utils "^3.0.0" + source-map "^0.7.3" + "@polka/url@^1.0.0-next.20": version "1.0.0-next.21" resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" @@ -9854,6 +9869,11 @@ commander@^9.2.0, commander@^9.4.1: resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== +common-path-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/common-path-prefix/-/common-path-prefix-3.0.0.tgz#7d007a7e07c58c4b4d5f433131a19141b29f11e0" + integrity sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w== + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -10251,6 +10271,11 @@ core-js-pure@^3.19.0: resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.20.0.tgz#7253feccf8bb05b72c153ddccdbe391ddbffbe03" integrity sha512-qsrbIwWSEEYOM7z616jAVgwhuDDtPLwZSpUsU3vyUkHYqKTf/uwOJBZg2V7lMurYWkpVlaVOxBrfX0Q3ppvjfg== +core-js-pure@^3.23.3: + version "3.28.0" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.28.0.tgz#4ef2888475b6c856ef6f5aeef8b4f618b76ad048" + integrity sha512-DSOVleA9/v3LNj/vFxAPfUHttKTzrB2RXhAPvR5TPXn4vrra3Z2ssytvRyt8eruJwAfwAiFADEbrjcRdcvPLQQ== + core-js@^2.4.0, core-js@^2.6.5: version "2.6.12" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" @@ -11757,6 +11782,13 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +error-stack-parser@^2.0.6: + version "2.1.4" + resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.1.4.tgz#229cb01cdbfa84440bfa91876285b94680188286" + integrity sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ== + dependencies: + stackframe "^1.3.4" + es-abstract@^1.18.5, es-abstract@^1.19.0, es-abstract@^1.19.1: version "1.19.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" @@ -14634,7 +14666,7 @@ html-encoding-sniffer@^3.0.0: dependencies: whatwg-encoding "^2.0.0" -html-entities@^2.3.2: +html-entities@^2.1.0, html-entities@^2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-2.3.3.tgz#117d7626bece327fc8baace8868fa6f5ef856e46" integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== @@ -17829,7 +17861,7 @@ loader-utils@^2.0.0: emojis-list "^3.0.0" json5 "^2.1.2" -loader-utils@^2.0.3: +loader-utils@^2.0.3, loader-utils@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== @@ -22436,6 +22468,11 @@ react-redux@^7.2.0: prop-types "^15.7.2" react-is "^17.0.2" +react-refresh@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e" + integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ== + react-router-dom@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.3.0.tgz#a0216da813454e521905b5fa55e0e5176123f43d" @@ -24446,6 +24483,11 @@ stackblur-canvas@^2.0.0: resolved "https://registry.yarnpkg.com/stackblur-canvas/-/stackblur-canvas-2.5.0.tgz#aa87bbed1560fdcd3138fff344fc6a1c413ebac4" integrity sha512-EeNzTVfj+1In7aSLPKDD03F/ly4RxEuF/EX0YcOG0cKoPXs+SLZxDawQbexQDBzwROs4VKLWTOaZQlZkGBFEIQ== +stackframe@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.3.4.tgz#b881a004c8c149a5e8efef37d51b16e412943310" + integrity sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw== + stacktrace-parser@^0.1.10: version "0.1.10" resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" From e2bfcb1bd27f77e181dffd9add02bdb4d545e0f6 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Tue, 21 Feb 2023 12:05:21 +0100 Subject: [PATCH 6/6] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b3c176c823..750b022009 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "nx": "nx", "start": "nx start", "serve": "nx serve remix-ide --configuration=development", - "hot": "nx serve remix-ide --configuration=hot", + "serve:hot": "nx serve remix-ide --configuration=hot", "build": "nx build", "test": "nx test", "lint": "nx lint",