-
-
Save nachodd/4e120492a5ddd56360e8cff9595753ae to your computer and use it in GitHub Desktop.
| // On PhpStorm, when ussing with laravel mix, for Alias path resolving in components you have to: | |
| // - create a webpack.config.js file separately like: | |
| const path = require('path') | |
| const webpack = require('webpack') | |
| module.exports = { | |
| ... | |
| resolve: { | |
| extensions: ['.js', '.json', '.vue'], | |
| alias: { | |
| '~': path.resolve(__dirname, './resources/assets/js') | |
| } | |
| }, | |
| ... | |
| } | |
| // And then import it in the webpack.mix.js like: | |
| const config = require('./webpack.config') | |
| ... | |
| mix.webpackConfig(config) | |
| // Make sure the webpack configuration file is pointed correctly in the configuration of the PhpStorm in: Settings > Languages & Frameworks > Javascript > Webpack |
@alessandrofuda You are the man 🚀
Another solution without create a webpack.config.js file separately:
phpstorm search for webpack.config.js, so into: phpstorm | Settings | Languages & Frameworks | Javascript | Webpack
have to set this path:
your-project/node_modules/laravel-mix/setup/webpack.config.jsthis works for me
@alessandrofuda Omg! Thank a lot
Another solution without create a webpack.config.js file separately:
phpstorm search for webpack.config.js, so into: phpstorm | Settings | Languages & Frameworks | Javascript | Webpack
have to set this path:
your-project/node_modules/laravel-mix/setup/webpack.config.jsthis works for me
good job @alessandrofuda
in 2021.1 version need confirm from Event Log (right side bottom)
Another solution without create a webpack.config.js file separately:
phpstorm search for webpack.config.js, so into: phpstorm | Settings | Languages & Frameworks | Javascript | Webpack
have to set this path:
your-project/node_modules/laravel-mix/setup/webpack.config.jsthis works for me
thank :) 🥇
Another solution without create a webpack.config.js file separately:
phpstorm search for webpack.config.js, so into: phpstorm | Settings | Languages & Frameworks | Javascript | Webpack
have to set this path:
your-project/node_modules/laravel-mix/setup/webpack.config.jsthis works for me
Thank you! 🥳
Another solution without create a webpack.config.js file separately:
phpstorm search for webpack.config.js, so into: phpstorm | Settings | Languages & Frameworks | Javascript | Webpack
have to set this path:
your-project/node_modules/laravel-mix/setup/webpack.config.jsthis works for me
Nice!!!!
Another solution without create a webpack.config.js file separately:
phpstorm search for webpack.config.js, so into: phpstorm | Settings | Languages & Frameworks | Javascript | Webpack
have to set this path:
your-project/node_modules/laravel-mix/setup/webpack.config.jsthis works for me
Thanks, it worked for me !!!!
this works for me
@alessandrofuda Thanks a lot man.
You saved my day.