E
E
Eugene2021-08-10 17:43:17
webpack
Eugene, 2021-08-10 17:43:17

How to spell alias correctly?

Tell me what I'm doing wrong.
I write an alias to webpack.mix.js, but it always gives me a path error.
To test and check the correctness of the path, I created a directory and a file:

mix.webpackConfig({
    resolve: {
        alias: {
            Utilities: path.resolve(__dirname, 'test/test.js'),
        }
    }
});

Mistake:
[webpack-cli] ReferenceError: path is not defined

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2021-08-10
@atachrus

https://laravel-mix.com/docs/6.0/aliases

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question