pull/5370/head
bunsenstraat 5 months ago
parent 734c656211
commit 6cefd134e7
  1. 11
      apps/remixdesktop/package.json
  2. 6
      apps/remixdesktop/tsconfig.json
  3. 40
      apps/remixdesktop/webpack.config.js

@ -22,9 +22,9 @@
"category": "public.app-category.productivity"
},
"scripts": {
"start:dev": "tsc && cp -R node_modules/yarn build/tools/ && cross-env NODE_ENV=development electron --inspect=5858 .",
"start:production": "tsc && && cp -R node_modules/yarn build/tools/ && cross-env NODE_ENV=production electron .",
"dist": "tsc && cp -R node_modules/yarn build/tools/ && electron-builder -p never",
"start:dev": "yarn webpack --config webpack.config.js && electron --inspect=5858 .",
"start:production": "cross-env NODE_ENV=production yarn webpack --config webpack.config.js && electron .",
"dist": "cross-env NODE_ENV=production yarn webpack --config webpack.config.js && electron-builder -p never",
"installRipGrepMacOXx64": "rm -rf node_modules/@vscode/ripgrep/bin && npm_config_arch=x64 node node_modules/@vscode/ripgrep/lib/postinstall.js",
"installRipGrepMacOXarm64": "rm -rf node_modules/@vscode/ripgrep/bin && npm_config_arch=arm64 node node_modules/@vscode/ripgrep/lib/postinstall.js",
"postinstall": "electron-builder install-app-deps",
@ -46,7 +46,12 @@
"electron-devtools-installer": "^3.2.0",
"nightwatch": "2.3",
"selenium-standalone": "^9.3.1",
"ts-loader": "^9.5.1",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.1.3",
"webpack": "^5.92.1",
"webpack-merge": "^6.0.1",
"webpack-node-externals": "^3.0.0",
"yarn": "^1.22.21"
},
"dependencies": {

@ -1,9 +1,8 @@
{
"compilerOptions": {
"jsx": "react-jsx",
"target": "ES6",
"allowJs": true,
"module": "commonjs",
"module": "ES6",
"skipLibCheck": true,
"esModuleInterop": true,
"noImplicitAny": false,
@ -12,9 +11,6 @@
"outDir": "build",
"moduleResolution": "node",
"resolveJsonModule": true,
"paths": {
"*": ["node_modules/*"]
},
"typeRoots": ["src/**/*.d.ts", "node_modules/@types", "test/**/*.d.ts", "../remix-ide-e2e/src/**/*.d.ts"]
},
"include": ["src/**/*"]

@ -0,0 +1,40 @@
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
const mode = process.env.NODE_ENV || 'development';
const webpack = require('webpack');
module.exports = {
mode,
entry: {
main: './src/main.ts',
preload: './src/preload.ts',
},
target: 'electron-main',
externals: [nodeExternals()],
module: {
rules: [
{
test: /\.ts$/,
include: /src/,
use: [{ loader: 'ts-loader' }]
}
]
},
resolve: {
extensions: ['.ts', '.js'],
plugins: [new TsconfigPathsPlugin({ configFile: './tsconfig.json' })]
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || mode)
})
],
output: {
path: path.resolve(__dirname, 'build'),
filename: '[name].js'
},
node: {
__dirname: false,
__filename: false
}
}
Loading…
Cancel
Save