mirror of
https://github.com/Fabio286/antares.git
synced 2025-01-30 00:55:36 +01:00
build: fixed module resolution and workers webpack config
This commit is contained in:
parent
c6c14fbf2b
commit
e3907914f2
@ -1,4 +1,4 @@
|
|||||||
import mysql from 'mysql2/promise';
|
import * as mysql from 'mysql2/promise';
|
||||||
import * as pg from 'pg';
|
import * as pg from 'pg';
|
||||||
import SSHConfig from 'ssh2-promise/lib/sshConfig';
|
import SSHConfig from 'ssh2-promise/lib/sshConfig';
|
||||||
import { MySQLClient } from '../../main/libs/clients/MySQLClient';
|
import { MySQLClient } from '../../main/libs/clients/MySQLClient';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import mysql from 'mysql2/promise';
|
import * as mysql from 'mysql2/promise';
|
||||||
import { AntaresCore } from '../AntaresCore';
|
import { AntaresCore } from '../AntaresCore';
|
||||||
import dataTypes from 'common/data-types/mysql';
|
import * as dataTypes from 'common/data-types/mysql';
|
||||||
import SSH2Promise from 'ssh2-promise';
|
import SSH2Promise from 'ssh2-promise';
|
||||||
import SSHConfig from 'ssh2-promise/lib/sshConfig';
|
import SSHConfig from 'ssh2-promise/lib/sshConfig';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { app, BrowserWindow, /* session, */ nativeImage, Menu } from 'electron';
|
import { app, BrowserWindow, /* session, */ nativeImage, Menu } from 'electron';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import Store from 'electron-store';
|
import * as Store from 'electron-store';
|
||||||
import * as windowStateKeeper from 'electron-window-state';
|
import * as windowStateKeeper from 'electron-window-state';
|
||||||
import * as remoteMain from '@electron/remote/main';
|
import * as remoteMain from '@electron/remote/main';
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
"target": "es2021",
|
"target": "es2021",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"moduleResolution": "node12",
|
"module": "CommonJS",
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"types": [
|
"types": [
|
||||||
"node"
|
"node"
|
||||||
|
@ -30,6 +30,11 @@ const config = {
|
|||||||
externals: externals.filter((d) => !whiteListedModules.includes(d)),
|
externals: externals.filter((d) => !whiteListedModules.includes(d)),
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.ts$/,
|
||||||
|
exclude: /node_modules/,
|
||||||
|
loader: 'ts-loader'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
use: 'babel-loader',
|
use: 'babel-loader',
|
||||||
@ -42,7 +47,7 @@ const config = {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.js', '.json'],
|
extensions: ['.js', '.json', '.ts'],
|
||||||
alias: {
|
alias: {
|
||||||
src: path.join(__dirname, 'src/'),
|
src: path.join(__dirname, 'src/'),
|
||||||
common: path.resolve(__dirname, 'src/common')
|
common: path.resolve(__dirname, 'src/common')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user