mirror of
https://github.com/aleleba/create-node-ts-graphql-server.git
synced 2025-07-25 22:18:24 -06:00
PR-934611: making some changes to webpack and updating packages.
This commit is contained in:
@ -1,12 +1,10 @@
|
||||
import path from 'path';
|
||||
import * as dotenv from 'dotenv';
|
||||
import webpack from 'webpack';
|
||||
import TerserPlugin from 'terser-webpack-plugin';
|
||||
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
|
||||
import ESLintPlugin from 'eslint-webpack-plugin';
|
||||
import nodeExternals from 'webpack-node-externals';
|
||||
|
||||
const dotEnvToParse = dotenv.config();
|
||||
import { deFaultValues } from './config';
|
||||
|
||||
const ROOT_DIR = path.resolve(__dirname);
|
||||
const resolvePath = (...args) => path.resolve(ROOT_DIR, ...args);
|
||||
@ -49,8 +47,8 @@ const config = {
|
||||
plugins: [
|
||||
new CleanWebpackPlugin(),
|
||||
new ESLintPlugin(),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': JSON.stringify(dotEnvToParse.parsed),
|
||||
new webpack.EnvironmentPlugin({
|
||||
...deFaultValues
|
||||
}),
|
||||
],
|
||||
optimization: {
|
||||
|
Reference in New Issue
Block a user