Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] [TS migration] Migrate 'Config' files to TypeScript #37718

Merged
merged 57 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
7b98ae0
update libraries to newer version with types, install types
JKobrynski Mar 4, 2024
630b8ae
migrate electronBuilder.config.js to TypeScript
JKobrynski Mar 4, 2024
1dbe373
migrate proxyConfig.js to TypeScript
JKobrynski Mar 4, 2024
c6a484f
migrate webpack.common.js to TypeScript
JKobrynski Mar 4, 2024
866211c
migrate webpack.desktop.js to TypeScript
JKobrynski Mar 4, 2024
847b4b7
start migrating webpack.dev.js to TypeScript
JKobrynski Mar 4, 2024
b29a9b3
add module declaration for preload-webpack-plugin
JKobrynski Mar 4, 2024
7ad015d
update scripts and documentation
JKobrynski Mar 4, 2024
ffc7b3d
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 4, 2024
21f6328
fix webpack.common.ts
JKobrynski Mar 4, 2024
5a6b1ee
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 5, 2024
59522b7
update imports in webpack.dev.ts
JKobrynski Mar 5, 2024
1819da7
update scripts in package.json, install webpack types
JKobrynski Mar 6, 2024
05b5c43
update file extensions in documentation
JKobrynski Mar 6, 2024
8bcb078
update tsconfig
JKobrynski Mar 6, 2024
56e5b17
update file extensions in documentation
JKobrynski Mar 6, 2024
b80efcc
update file extension in webpack.config.js
JKobrynski Mar 6, 2024
7649b02
migrate webpack.common.js to TypeScript
JKobrynski Mar 6, 2024
a0ba014
migrate webpack.desktop.js to TypeScript
JKobrynski Mar 6, 2024
512cf42
migrate webpack.dev.js to TypeScript
JKobrynski Mar 6, 2024
5ef518a
update file extensions in scripts
JKobrynski Mar 6, 2024
677243b
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 6, 2024
77a9b0d
start migrating CustomVersionFilePlugin to TypeScript
JKobrynski Mar 7, 2024
0141669
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 8, 2024
3c29359
Migrate CustomVersionFilePlugin to TypeScript
JKobrynski Mar 8, 2024
ca48f2c
revert electronBuilder.config.to to JavaScript
JKobrynski Mar 8, 2024
dafc6bb
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 12, 2024
21721cf
convert CustomVersionFilePlugin to esmodule
JKobrynski Mar 12, 2024
ec234b6
use import instead of require in webpack.dev.ts
JKobrynski Mar 12, 2024
a3e32ed
use import instead of require in CustomVersionFilePlugin
JKobrynski Mar 12, 2024
73406a6
replace require with import in webpack.common.ts, bump version of cle…
JKobrynski Mar 12, 2024
d11e749
replace require with import in webpack.desktop.ts
JKobrynski Mar 12, 2024
e09aadf
replace require with import in webpack.dev.ts
JKobrynski Mar 12, 2024
acedc7f
update file extension in readme
JKobrynski Mar 12, 2024
1a31c28
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 14, 2024
b2fb18f
remove esModuleInterop from tsconfig
JKobrynski Mar 15, 2024
7dc8d4d
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 18, 2024
0984f64
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 19, 2024
b05ea1a
apply minor improvements
JKobrynski Mar 19, 2024
433c321
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 20, 2024
ffdcc2b
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 20, 2024
55eb2d3
apply suggested changes
JKobrynski Mar 20, 2024
bbe50b6
update require to suit ESM in webpack.config.js
JKobrynski Mar 20, 2024
cc93841
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 21, 2024
e059dd1
apply suggested changes
JKobrynski Mar 21, 2024
0781659
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 22, 2024
b44cd0f
apply suggested changes;
JKobrynski Mar 25, 2024
170b3fe
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 25, 2024
6ec96dd
apply suggested changes to CustomVersionFilePlugin.ts
JKobrynski Mar 25, 2024
5bb52b4
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 25, 2024
d38ea29
apply suggested changes
JKobrynski Mar 26, 2024
bfa7795
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 26, 2024
39fe477
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 27, 2024
80796d3
apply suggested changes
JKobrynski Mar 27, 2024
0756e49
apply suggested changes to webpack config files
JKobrynski Mar 28, 2024
4c9144b
Merge branch 'main' into migrateConfigFilesToTypeScript
JKobrynski Mar 28, 2024
ed108c4
add additional if statements to webpack.common.ts
JKobrynski Mar 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = ({config}) => {
'@react-native-community/netinfo': path.resolve(__dirname, '../__mocks__/@react-native-community/netinfo.ts'),
'@react-navigation/native': path.resolve(__dirname, '../__mocks__/@react-navigation/native'),

// Module alias support for storybook files, coping from `webpack.common.js`
// Module alias support for storybook files, coping from `webpack.common.ts`
...custom.resolve.alias,
};

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ If you're using another operating system, you will need to ensure `mkcert` is in

## Running the web app 🕸
* To run the **development web app**: `npm run web`
* Changes applied to Javascript will be applied automatically via WebPack as configured in `webpack.dev.js`
* Changes applied to Javascript will be applied automatically via WebPack as configured in `webpack.dev.ts`

## Running the iOS app 📱
For an M1 Mac, read this [SO](https://stackoverflow.com/questions/64901180/how-to-run-cocoapods-on-apple-silicon-m1) for installing cocoapods.
Expand Down
9 changes: 8 additions & 1 deletion config/proxyConfig.js → config/proxyConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
* We only specify for staging URLs as API requests are sent to the production
* servers by default.
*/
module.exports = {
JKobrynski marked this conversation as resolved.
Show resolved Hide resolved
type ProxyConfig = {
STAGING: string;
STAGING_SECURE: string;
};

const proxyConfig: ProxyConfig = {
STAGING: '/staging/',
STAGING_SECURE: '/staging-secure/',
};

export default proxyConfig;
33 changes: 0 additions & 33 deletions config/webpack/CustomVersionFilePlugin.js

This file was deleted.

23 changes: 23 additions & 0 deletions config/webpack/CustomVersionFilePlugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import fs from 'fs';
import path from 'path';
import type {Compiler} from 'webpack';
import {version as APP_VERSION} from '../../package.json';

/**
* Simple webpack plugin that writes the app version (from package.json) and the webpack hash to './version.json'
*/
class CustomVersionFilePlugin {
apply(compiler: Compiler) {
compiler.hooks.done.tap(this.constructor.name, () => {
const versionPath = path.join(__dirname, '/../../dist/version.json');
fs.mkdir(path.dirname(versionPath), {recursive: true}, (dirErr) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB: Not sure if this was copy pasted from somewhere, but if not, should we update dirErr and err to directoryError and error respectively?

if (dirErr) {
return;
}
JKobrynski marked this conversation as resolved.
Show resolved Hide resolved
fs.writeFile(versionPath, JSON.stringify({version: APP_VERSION}), {encoding: 'utf8'}, () => {});
JKobrynski marked this conversation as resolved.
Show resolved Hide resolved
});
});
}
}

export default CustomVersionFilePlugin;
JKobrynski marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
const path = require('path');
const fs = require('fs');
const {IgnorePlugin, DefinePlugin, ProvidePlugin, EnvironmentPlugin} = require('webpack');
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const dotenv = require('dotenv');
const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer');
/* eslint-disable @typescript-eslint/naming-convention */
import {CleanWebpackPlugin} from 'clean-webpack-plugin';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we disable this just for the lines that need it, and directly above the lines that need it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would have to disable it for about 15 lines in this file, that's why I disabled it globally

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't block on this then. I think that's more important for our actual code so we don't unintentionally silence any lint errors

import CopyPlugin from 'copy-webpack-plugin';
import dotenv from 'dotenv';
import fs from 'fs';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import path from 'path';
import type {Configuration} from 'webpack';
import {DefinePlugin, EnvironmentPlugin, IgnorePlugin, ProvidePlugin} from 'webpack';
import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer';
import CustomVersionFilePlugin from './CustomVersionFilePlugin';

const PreloadWebpackPlugin = require('@vue/preload-webpack-plugin');
const CustomVersionFilePlugin = require('./CustomVersionFilePlugin');
JKobrynski marked this conversation as resolved.
Show resolved Hide resolved

const includeModules = [
'react-native-animatable',
Expand All @@ -25,14 +28,14 @@ const includeModules = [
'expo-av',
].join('|');

const envToLogoSuffixMap = {
const envToLogoSuffixMap: Record<string, string> = {
production: '',
staging: '-stg',
dev: '-dev',
adhoc: '-adhoc',
};

function mapEnvToLogoSuffix(envFile) {
function mapEnvToLogoSuffix(envFile: string): string {
let env = envFile.split('.')[2];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB but envFile => environmentFile. Let's do this for all the truncated variable names in these files (like env below too)

if (typeof env === 'undefined') {
env = 'dev';
Expand All @@ -42,12 +45,8 @@ function mapEnvToLogoSuffix(envFile) {

/**
* Get a production grade config for web or desktop
* @param {Object} env
* @param {String} env.envFile path to the env file to be used
* @param {'web'|'desktop'} env.platform
* @returns {Configuration}
*/
const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({
const getCommonConfig = ({envFile = '.env', platform = 'web'}): Configuration => ({
mode: 'production',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define a type for the config getter function in types.ts and use that type in other getter functions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not done yet

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created a return type for config functions, that's not what you meant?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I meant is to define the type for the function e.g.

type GetConfig = (envFile: EnvFile) => Configuration;

Then use that type when defining the functions e.g.

const getCommonConfig: GetConfig = ({envFile = '.env', platform = 'web'}) => ({

Though I see multiple return options (Configuration | Configuration[] | Promise<Configuration>;) so this may need more work than expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's not exactly the same for these different files. Do you think it still makes sense to create one type?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that would add much value in this case. I added review comments to add types to both the input and the output of each function

JKobrynski marked this conversation as resolved.
Show resolved Hide resolved
devtool: 'source-map',
entry: {
Expand Down Expand Up @@ -275,4 +274,4 @@ const webpackConfig = ({envFile = '.env', platform = 'web'}) => ({
},
});

module.exports = webpackConfig;
export default getCommonConfig;
JKobrynski marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
const path = require('path');
const webpack = require('webpack');
const _ = require('underscore');

const desktopDependencies = require('../../desktop/package.json').dependencies;
const getCommonConfig = require('./webpack.common');
/* eslint-disable @typescript-eslint/naming-convention */
import path from 'path';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use eslint-disable-next-line above the lines that need it, and use consistent comment style (// or /* */)

import webpack from 'webpack';
// eslint-disable-next-line @dword-design/import-alias/prefer-alias, import/no-relative-packages
import {dependencies as desktopDependencies} from '../../desktop/package.json';
import getCommonConfig from './webpack.common';
JKobrynski marked this conversation as resolved.
Show resolved Hide resolved
import type {EnvFile} from './webpack.dev';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mentioning this again since you 👍 'd even though I said it's NAB. Are we updating all the configs to configurations or not? Just curious
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to change it, thanks


/**
* Desktop creates 2 configurations in parallel
* 1. electron-main - the core that serves the app content
* 2. web - the app content that would be rendered in electron
* Everything is placed in desktop/dist and ready for packaging
* @param {Object} env
* @returns {webpack.Configuration[]}
*/
module.exports = (env) => {
const getConfig = (env: EnvFile = {}) => {
const rendererConfig = getCommonConfig({...env, platform: 'desktop'});
const outputPath = path.resolve(__dirname, '../../desktop/dist');

rendererConfig.name = 'renderer';
rendererConfig.output.path = path.join(outputPath, 'www');
if (rendererConfig.output) {
rendererConfig.output.path = path.join(outputPath, 'www');
}

JKobrynski marked this conversation as resolved.
Show resolved Hide resolved
// Expose react-native-config to desktop-main
const definePlugin = _.find(rendererConfig.plugins, (plugin) => plugin.constructor === webpack.DefinePlugin);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment above the line below it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's above, not 100% sure what the author had in mind though

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 I phrased that very poorly, but I think you got it. How does this line expose react-native-config to desktop-main? Isn't that done by plugins: [definePlugin],? this isn't a blocker

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By "author" I meant the person that added the comment 😄

// const definePlugin = _.find(rendererConfig.plugins, (plugin) => plugin.constructor === webpack.DefinePlugin);
const definePlugin = rendererConfig.plugins?.find((plugin) => plugin?.constructor === webpack.DefinePlugin);
JKobrynski marked this conversation as resolved.
Show resolved Hide resolved

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the ? in plugin?.constructor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, plugin might be null or undefined

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. I quickly searched for the type of rendererConfig.plugins to try to figure this out and didn't find it, and I was assuming that if we can iterate over rendererConfig.plugins, then the items in it wouldn't be null or undefined

const mainProcessConfig = {
mode: 'production',
JKobrynski marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -38,7 +40,7 @@ module.exports = (env) => {
},
resolve: rendererConfig.resolve,
plugins: [definePlugin],
externals: [..._.keys(desktopDependencies), 'fsevents'],
externals: [...Object.keys(desktopDependencies), 'fsevents'],
node: {
/**
* Disables webpack processing of __dirname and __filename, so it works like in node
Expand All @@ -60,3 +62,5 @@ module.exports = (env) => {

return [mainProcessConfig, rendererConfig];
};

export default getConfig;
30 changes: 19 additions & 11 deletions config/webpack/webpack.dev.js → config/webpack/webpack.dev.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
const path = require('path');
const portfinder = require('portfinder');
const {DefinePlugin} = require('webpack');
const {merge} = require('webpack-merge');
const {TimeAnalyticsPlugin} = require('time-analytics-webpack-plugin');
const getCommonConfig = require('./webpack.common');
/* eslint-disable @typescript-eslint/naming-convention */
import path from 'path';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use eslint-disable-next-line above every line that needs it?

import portfinder from 'portfinder';
import {TimeAnalyticsPlugin} from 'time-analytics-webpack-plugin';
import type webpack from 'webpack';
import {DefinePlugin} from 'webpack';
import {merge} from 'webpack-merge';
import getCommonConfig from './webpack.common';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import getCommonConfig from './webpack.common';
import getCommonConfiguration from './webpack.common';

const BASE_PORT = 8082;

type EnvFile = Partial<{
envFile: string;
platform: 'web' | 'desktop';
}>;

JKobrynski marked this conversation as resolved.
Show resolved Hide resolved
/**
* Configuration for the local dev server
* @param {Object} env
* @returns {Configuration}
*/
module.exports = (env = {}) =>
const getConfig = (env: EnvFile = {}): Promise<webpack.Configuration> =>
portfinder.getPortPromise({port: BASE_PORT}).then((port) => {
// Check if the USE_WEB_PROXY variable has been provided
// and rewrite any requests to the local proxy server
Expand Down Expand Up @@ -60,7 +65,7 @@ module.exports = (env = {}) =>
],
cache: {
type: 'filesystem',
name: env.platform || 'default',
name: env.platform ?? 'default',
buildDependencies: {
// By default, webpack and loaders are build dependencies
// This (also) makes all dependencies of this config file - build dependencies
Expand All @@ -74,7 +79,10 @@ module.exports = (env = {}) =>
/([\\/]node_modules[\\/](?!react-native-onyx))/,
],
},
});
} as webpack.Configuration);

JKobrynski marked this conversation as resolved.
Show resolved Hide resolved
return TimeAnalyticsPlugin.wrap(config);
});

export default getConfig;
export type {EnvFile};
10 changes: 5 additions & 5 deletions contributingGuides/APPLE_GOOGLE_SIGNIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ After you've set ngrok up to be able to run on your machine (requires configurin
ngrok http 8082 --host-header="dev.new.expensify.com:8082" --subdomain=mysubdomain
```

The `--host-header` flag is there to avoid webpack errors with header validation. In addition, add `allowedHosts: 'all'` to the dev server config in `webpack.dev.js`:
The `--host-header` flag is there to avoid webpack errors with header validation. In addition, add `allowedHosts: 'all'` to the dev server config in `webpack.dev.ts`:

```js
devServer: {
Expand Down Expand Up @@ -243,12 +243,12 @@ Here's how you can re-enable the SSO buttons in development mode:
<Text
accessibilityElementsHidden
```
- Update the webpack.dev.js [config](https://github.com/Expensify/App/blob/1d6bb1d14cff3dd029868a0a7c8ee14ae78c527b/config/webpack/webpack.dev.js#L47-L49) to change `host` from `dev.new.expensify.com` to `localhost` and server type from `https` to `http`. The reason for this is that Google Sign In allows localhost, but `dev.new.expensify.com` is not a registered Google Sign In domain.
- Update the webpack.dev.ts [config](https://github.com/Expensify/App/blob/1d6bb1d14cff3dd029868a0a7c8ee14ae78c527b/config/webpack/webpack.dev.ts#L47-L49) to change `host` from `dev.new.expensify.com` to `localhost` and server type from `https` to `http`. The reason for this is that Google Sign In allows localhost, but `dev.new.expensify.com` is not a registered Google Sign In domain.
JKobrynski marked this conversation as resolved.
Show resolved Hide resolved
```diff
diff --git a/config/webpack/webpack.dev.js b/config/webpack/webpack.dev.js
diff --git a/config/webpack/webpack.dev.ts b/config/webpack/webpack.dev.ts
index e28383eff5..b14f6f34aa 100644
--- a/config/webpack/webpack.dev.js
+++ b/config/webpack/webpack.dev.js
--- a/config/webpack/webpack.dev.ts
+++ b/config/webpack/webpack.dev.ts
JKobrynski marked this conversation as resolved.
Show resolved Hide resolved
@@ -44,9 +44,9 @@ module.exports = (env = {}) =>
...proxySettings,
historyApiFallback: true,
Expand Down
2 changes: 1 addition & 1 deletion desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Once the command finishes, revert the version update in `package.json`, remove `
To avoid bundling unnecessary `node_modules` we use a [2 package structure](https://www.electron.build/tutorials/two-package-structure)
The root [package.json](../package.json) serves for `devDependencies` and shared (renderer) `dependencies`
The [desktop/package.json](./package.json) serves for desktop (electron-main) specific dependencies
We use Webpack with a [desktop specific config](../config/webpack/webpack.desktop.js) to bundle our js code
We use Webpack with a [desktop specific config](../config/webpack/webpack.desktop.ts) to bundle our js code
Half of the config takes care of packaging root package dependencies - everything related to rendering App in the Electron window. Packaged under `dist/www`
The other half is about bundling the `main.js` script which initializes Electron and renders `www`

Expand Down
4 changes: 2 additions & 2 deletions desktop/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ portfinder
port: basePort,
})
.then((port) => {
const devServer = `webpack-dev-server --config config/webpack/webpack.dev.js --port ${port} --env platform=desktop`;
const buildMain = 'webpack watch --config config/webpack/webpack.desktop.js --config-name desktop-main --mode=development';
const devServer = `webpack-dev-server --config config/webpack/webpack.dev.ts --port ${port} --env platform=desktop`;
const buildMain = 'webpack watch --config config/webpack/webpack.desktop.ts --config-name desktop-main --mode=development';

const env = {
PORT: port,
Expand Down
Loading
Loading