-const base = {
- output: {
- filename: "js/server.js",
- publicPath: "/",
- hashFunction: "xxhash64",
- },
- resolve: {
- plugins: [new TsconfigPathsPlugin()],
- extensions: [".js", ".jsx", ".ts", ".tsx"],
- },
- performance: {
- hints: false,
- },
- module: {
- rules: [
- {
- test: /\.(scss|css)$/i,
- use: [MiniCssExtractPlugin.loader, "css-loader", "sass-loader"],
- },
- {
- test: /\.(js|jsx|tsx|ts)$/, // All ts and tsx files will be process by
- exclude: /node_modules/, // ignore node_modules
- loader: "babel-loader",
+module.exports = (env, argv) => {
+ const mode = argv.mode;
+
+ const base = {
+ output: {
+ filename: "js/server.js",
+ publicPath: "/",
+ hashFunction: "xxhash64",
+ },
+ resolve: {
+ extensions: [".js", ".jsx", ".ts", ".tsx"],
+ alias: {
+ "@": resolve(__dirname, "src/"),
+ "@utils": resolve(__dirname, "src/shared/utils/"),