fix webpack

rdesktop
filip mertens 2 years ago
parent f340185415
commit 463d39d99e
  1. 11
      apps/remix-ide/webpack.config.js
  2. 18
      apps/remixdesktop/forge.config.ts
  3. 1138
      apps/remixdesktop/list.json

@ -16,23 +16,23 @@ const versionData = {
const loadLocalSolJson = async () => { const loadLocalSolJson = async () => {
// execute apps/remix-ide/ci/downloadsoljson.sh // execute apps/remix-ide/ci/downloadsoljson.sh
const child = require('child_process').execSync('bash ./apps/remix-ide/ci/downloadsoljson.sh', { encoding: 'utf8', cwd: process.cwd(), shell: true }) //const child = require('child_process').execSync('bash ' + __dirname + '/ci/downloadsoljson.sh', { encoding: 'utf8', cwd: process.cwd(), shell: true })
// show output // show output
console.log(child) //console.log(child)
} }
fs.writeFileSync('./apps/remix-ide/src/assets/version.json', JSON.stringify(versionData)) fs.writeFileSync(__dirname + '/src/assets/version.json', JSON.stringify(versionData))
loadLocalSolJson() loadLocalSolJson()
const project = fs.readFileSync('./apps/remix-ide/project.json', 'utf8') const project = fs.readFileSync(__dirname + '/project.json', 'utf8')
const implicitDependencies = JSON.parse(project).implicitDependencies const implicitDependencies = JSON.parse(project).implicitDependencies
const copyPatterns = implicitDependencies.map((dep) => { const copyPatterns = implicitDependencies.map((dep) => {
try { try {
fs.statSync(__dirname + `/../../dist/apps/${dep}`).isDirectory() fs.statSync(__dirname + `/../../dist/apps/${dep}`).isDirectory()
return { from: `../../dist/apps/${dep}`, to: `plugins/${dep}` } return { from: __dirname + `../../dist/apps/${dep}`, to: `plugins/${dep}` }
} }
catch (e) { catch (e) {
console.log('error', e) console.log('error', e)
@ -130,6 +130,7 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
ignored: /node_modules/ ignored: /node_modules/
} }
console.log('config', config)
return config; return config;
}); });

@ -6,10 +6,14 @@ import { MakerRpm } from '@electron-forge/maker-rpm';
import { WebpackPlugin } from '@electron-forge/plugin-webpack'; import { WebpackPlugin } from '@electron-forge/plugin-webpack';
import { mainConfig } from './webpack.main.config'; import { mainConfig } from './webpack.main.config';
import { rendererConfig } from './webpack.renderer.config';
import copy from 'recursive-copy'; import copy from 'recursive-copy';
import fs from 'fs'; import fs from 'fs';
const ideconfig = require('../remix-ide/webpack.config.js');
console.log(ideconfig);
const config: ForgeConfig = { const config: ForgeConfig = {
packagerConfig: {}, packagerConfig: {},
rebuildConfig: {}, rebuildConfig: {},
@ -50,17 +54,9 @@ const config: ForgeConfig = {
devContentSecurityPolicy: // allow all content for now devContentSecurityPolicy: // allow all content for now
"default-src * data: blob: filesystem: about: ws: wss: 'unsafe-inline' 'unsafe-eval'; script-src * data: blob: 'unsafe-inline' 'unsafe-eval'; connect-src * data: blob: 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src * data: blob: ; style-src * data: blob: 'unsafe-inline'; font-src * data: blob: 'unsafe-inline';" "default-src * data: blob: filesystem: about: ws: wss: 'unsafe-inline' 'unsafe-eval'; script-src * data: blob: 'unsafe-inline' 'unsafe-eval'; connect-src * data: blob: 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src * data: blob: ; style-src * data: blob: 'unsafe-inline'; font-src * data: blob: 'unsafe-inline';"
,renderer: { ,renderer: {
config: rendererConfig, config: ideconfig,
entryPoints: [ entryPoints: [
{ ]
html: '../../dist/apps/remix-ide/index.html',
js: './src/renderer.ts',
name: 'main_window',
preload: {
js: './src/preload.ts',
},
},
],
}, },
}), }),
], ],

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save