rdesktop^2
filip mertens 1 year ago
parent b8e344da37
commit 3cd5c54262
  1. 2
      apps/remix-ide/project.json
  2. 2
      apps/remix-ide/src/app.js
  3. 4
      apps/remix-ide/src/index.tsx
  4. 17
      apps/remixdesktop/webpack.config.js
  5. 2
      package.json

@ -3,7 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/remix-ide/src",
"projectType": "application",
"implicitDependencies": [],
"implicitDependencies": ["doc-gen", "doc-viewer", "etherscan", "vyper", "walletconnect"],
"targets": {
"build": {
"executor": "@nrwl/webpack:webpack",

@ -78,7 +78,7 @@ class AppComponent {
constructor() {
console.log(window.electronAPI)
console.log(window)
console.log(window.api)
this.appManager = new RemixAppManager({})
this.queryParams = new QueryParams()

@ -16,14 +16,14 @@ import { Storage } from '@remix-project/remix-lib'
} catch (e) { }
const theme = new ThemeModule()
theme.initTheme()
/*
render(
<React.StrictMode>
<Preload></Preload>
</React.StrictMode>,
document.getElementById('root')
)
*/
})()

@ -4,11 +4,15 @@ const TerserPlugin = require("terser-webpack-plugin")
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin")
// Nx plugins for webpack.
module.exports = composePlugins((config) => {
config = {}
module.exports = composePlugins((input) => {
const config = {
mode: input.mode === 'production' ? 'production' : 'development',
}
config.target = 'electron-main'
config.devtool = 'source-map'
config.mode = 'production'
config.output = {
path: __dirname + '/.webpack/main',
filename: '[name].js',
@ -21,10 +25,13 @@ module.exports = composePlugins((config) => {
preload: ['./apps/remixdesktop/src/preload.ts'],
}
const mainEntry = config.mode === 'production'? `\`file://$\{require('path').resolve(__dirname, '..', 'renderer', 'index.html')}\``: `'http://localhost:8080'`
config.plugins= [
new webpack.DefinePlugin({
MAIN_WINDOW_WEBPACK_ENTRY:`\`file://$\{require('path').resolve(__dirname, '..', 'renderer', 'index.html')}\``,
'process.env.MAIN_WINDOW_WEBPACK_ENTRY': `\`file://$\{require('path').resolve(__dirname, '..', 'renderer', 'index.html')}\``,
MAIN_WINDOW_WEBPACK_ENTRY: mainEntry,
'process.env.MAIN_WINDOW_WEBPACK_ENTRY': mainEntry,
MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY: `\`$\{require('path').resolve(__dirname, 'preload.js')}\``,
'process.env.MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY': `\`$\{require('path').resolve(__dirname, '..', 'render', 'preload.js')}\``,
})

@ -55,7 +55,7 @@
"build:e2e": "node apps/remix-ide-e2e/src/buildGroupTests.js && tsc -p apps/remix-ide-e2e/tsconfig.e2e.json",
"serve:desktop:dist": "rm -rf apps/remixdesktop/.webpack && yarn nx build remixdesktop && NX_DESKTOP_FROM_DIST=true nx build remix-ide --configuration=desktop && cp -r dist/apps/remix-ide apps/remixdesktop/.webpack/renderer && yarn electron apps/remixdesktop/.webpack/main",
"build:desktop": "rm -rf apps/remixdesktop/.webpack && yarn nx build remixdesktop && NX_DESKTOP_FROM_DIST=true nx build remix-ide --configuration=desktop && cp -r dist/apps/remix-ide apps/remixdesktop/.webpack/renderer && cd apps/remixdesktop/ && yarn package",
"serve:desktop:webpack": "rm -rf apps/remixdesktop/.webpack && yarn nx build remixdesktop && yarn serve && yarn electron apps/remixdesktop",
"serve:desktop": "rm -rf apps/remixdesktop/.webpack && yarn nx build remixdesktop --configuration=development && yarn electron apps/remixdesktop",
"babel": "babel",
"watch:e2e": "nodemon",
"bumpVersion:libs": "gulp & gulp syncLibVersions;",

Loading…
Cancel
Save