How to resolve module in webpack

Hi I try to migrate requrejs to webpack 5 actually and after running npx mix watch I getting error about missing module.

ERROR in ./utils/i18n.js 1:0-60
Module not found: Error: Can't resolve 'php/messages' in ....

I see that php/messages are required in i18n ./utils/i18n.js so I tried add alias into webpack. My webpack file looks like this

const path = require('path');
let mix = require('laravel-mix');

mix.webpackConfig({
    context: path.resolve(__dirname + '/resources/assets/js'),
    entry: './main.js',
    output: {
        filename: 'bundle.js',
    },
    resolve: {
        alias: {
            "php/messages": "js/messages.js",
        }
    },
})

Am I missing something? I am not really sure if webpack at least has found my file or not….