mirror of
https://github.com/aleleba/create-node-ts-graphql-server.git
synced 2025-07-25 22:18:24 -06:00
PR-780243: adding only one source of truth.
This commit is contained in:
@ -4,11 +4,13 @@ import TerserPlugin from 'terser-webpack-plugin';
|
||||
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
|
||||
import ESLintPlugin from 'eslint-webpack-plugin';
|
||||
import nodeExternals from 'webpack-node-externals';
|
||||
import { resolveTsAliases } from 'resolve-ts-aliases';
|
||||
import { deFaultValues } from './config';
|
||||
|
||||
const ROOT_DIR = path.resolve(__dirname);
|
||||
const resolvePath = (...args) => path.resolve(ROOT_DIR, ...args);
|
||||
const BUILD_DIR = resolvePath('build');
|
||||
const alias = resolveTsAliases(path.resolve('tsconfig.json'));
|
||||
|
||||
const config = {
|
||||
entry: './src/index.ts',
|
||||
@ -20,13 +22,7 @@ const config = {
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.ts', '.json', '.gql'],
|
||||
alias: {
|
||||
'@controllers': path.resolve(__dirname, 'controllers/'),
|
||||
'@models': path.resolve(__dirname, 'models/'),
|
||||
'@controllerGraphQL': path.resolve(__dirname, 'controllers/controllerGraphQL/'),
|
||||
'@GraphQL': path.resolve(__dirname, 'GraphQL/'),
|
||||
'@config': path.resolve(__dirname, 'config/'),
|
||||
}
|
||||
alias,
|
||||
},
|
||||
mode: 'production',
|
||||
module: {
|
||||
|
Reference in New Issue
Block a user