Working version(some)

This commit is contained in:
2025-07-06 22:13:09 +05:00
parent 12f7ea8d1c
commit 4717132b05
8 changed files with 1164 additions and 94 deletions

View File

@ -1,7 +1,3 @@
/**
* Base webpack config used across other specific configs
*/
import webpack from 'webpack';
import TsconfigPathsPlugins from 'tsconfig-paths-webpack-plugin';
import webpackPaths from './webpack.paths';
@ -20,7 +16,6 @@ const configuration: webpack.Configuration = {
use: {
loader: 'ts-loader',
options: {
// Remove this line to enable type checking in webpack builds
transpileOnly: true,
compilerOptions: {
module: 'nodenext',
@ -34,18 +29,22 @@ const configuration: webpack.Configuration = {
output: {
path: webpackPaths.srcPath,
// https://github.com/webpack/webpack/issues/1114
library: { type: 'commonjs2' },
},
/**
* Determine the array of extensions that should be used to resolve modules.
*/
resolve: {
extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'],
modules: [webpackPaths.srcPath, 'node_modules'],
// There is no need to add aliases here, the paths in tsconfig get mirrored
plugins: [new TsconfigPathsPlugins()],
// Новые настройки
extensionAlias: {
'.js': ['.js', '.mjs'],
},
fullySpecified: false,
alias: {
'undici/lib/core/util': 'undici/lib/core/util.js',
},
},
plugins: [new webpack.EnvironmentPlugin({ NODE_ENV: 'production' })],