Autoupload doesn't work immediately when file changed(bundled from Webpack)
I use Webpack with webpack-cli.
When i change source code, start bundling and inject bundled file to specific directory.
But autoupload doesn't work at that time.
when i leave and come in to PhpStorm, autoupload work well.
How automatically upload changed file?
(sorry for my stupid english)
--------------------------------
Edit
I change the way that use custom webpack-cli to phpStorm fileWatcher with project webpack.config.js file.
But i got error
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module '@babel/preset-env' from '/Applications/PhpStorm.app/Contents/bin'
I think phpStorm has own root directory.
But i want to use my project's dependencies.
How can i config?
Thank you
Please sign in to leave a comment.
PhpStorm is not scanning for changes constantly, here's how force the file system to refresh:
As for the webpack issue, I am moving this thread to WebStorm as they usually deal with this kind of problems.
>I think phpStorm has own root directory.
looks like a problem with the specified working directory. What does your file watcher look like? Please attach a screenshot of you settings (make sure that Working directory and Environment variables fields arfe visible)
Hi, is there a solution to this problem?
sorry, what problem?
When i build project with webpack, he add file and put them in to folder. But phpstorm d't see this files and don't start autoload to server. I must move focus from an editor tabs or switch between app for start autoload. I must do that after each saving file
This is expected, as the IDE virtual file system is not refreshed automatically on external changes.
You can try setting up webpack as a file watcher in Settings | Tools | File Watchers - the IDE will auto-synchronize the folder specified in Output paths to refresh once the build completes
Sorry, don't saw your answer. I tried use webpack as file watcher external tool, but problem is still here. Phpstorm dones not see bundler before i dont change tab or dont switch app
what does your watcher look like? You need to make sure to set up the Output paths to refresh correctly to make this work