Mix not resolving Alias using Mix.webpackConfig
See original GitHub issue- laravel-mix: “1.4.5”,
- Node v6.11.3
- NPM v3.10.10
- OS: OSX Sierra
Description:
Dependency not found error when trying to reference an alias from webpackConfig
mix.webpackConfig({
resolve: {
alias: {
Admin: path.resolve(__dirname, 'resources/admin')
}
}
});
Then trying to reference it as
import Validator from 'Admin/core/Validation/VeeValidation'
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (3 by maintainers)
Top Results From Across the Web
Getting Webpack alias working in mix
I have a project where I am trying to refactor the JavaScript imports to be able to use absolute paths rather than relative....
Read more >Webpack alias in Laravel Mix to node_modules
JS in a Laravel 5.8 project to import css and js I have in my module. webpack.mix.js mix.webpackConfig({ resolve: { alias: { 'alias': ......
Read more >Resolve alias using Laravel-Mix
Hello everybody,. I got this (shortened) mix-file (`webpack.mix.js`):. const mix = require('laravel-mix'); const path = require('path');
Read more >Aliases | Laravel Mix Documentation
Mix offers the ability to configure aliases that get expanded when importing files. It supports aliasing specific paths and whole modules. Aliasing Paths....
Read more >Laravel tips: set resolve alias in Laravel mix
This is not exactly about Laravel but Webpack, neverthless, I thought I should have set this at the b... Tagged with laravel, webpack....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It does not work for me still
Updated NPM, regarding the error output here it is
Note that in this case the alias is “@admin”
Set like this in webpack.mix.js