DEV Community

Discussion on: Laravel tips: set resolve alias in Laravel mix

Collapse
 
brickgale profile image
Brian Monsales

mix.extend('exampleConfig', new class {
webpackConfig(webpackConfig) {
webpackConfig.resolve.extensions.push('.js', '.vue', '.json'); // you don't need this on v4
webpackConfig.resolve.alias = {
'vue$': 'vue/dist/vue.esm.js',
'@': __dirname + '/resources/assets/js'
};
}
});

and lastly, call it on last: mix.exampleConfig();

Collapse
 
acro5piano profile image
Kay Gosho

Thank you for pointing out!