pull/5127/head
bunsenstraat 5 months ago
parent 3fcc7f6fc6
commit ad0f093287
  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" "category": "public.app-category.productivity"
}, },
"scripts": { "scripts": {
"start:dev": "tsc && cp -R node_modules/yarn build/tools/ && cross-env NODE_ENV=development electron --inspect=5858 .", "start:dev": "yarn webpack --config webpack.config.js && electron --inspect=5858 .",
"start:production": "tsc && && cp -R node_modules/yarn build/tools/ && cross-env NODE_ENV=production electron .", "start:production": "cross-env NODE_ENV=production yarn webpack --config webpack.config.js && electron .",
"dist": "tsc && cp -R node_modules/yarn build/tools/ && electron-builder -p never", "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", "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", "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", "postinstall": "electron-builder install-app-deps",
@ -46,7 +46,12 @@
"electron-devtools-installer": "^3.2.0", "electron-devtools-installer": "^3.2.0",
"nightwatch": "2.3", "nightwatch": "2.3",
"selenium-standalone": "^9.3.1", "selenium-standalone": "^9.3.1",
"ts-loader": "^9.5.1",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.1.3", "typescript": "^5.1.3",
"webpack": "^5.92.1",
"webpack-merge": "^6.0.1",
"webpack-node-externals": "^3.0.0",
"yarn": "^1.22.21" "yarn": "^1.22.21"
}, },
"dependencies": { "dependencies": {

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