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 

8 comments
Comment actions Permalink

How automatically upload changed file?

PhpStorm is not scanning for changes constantly, here's how force the file system to refresh:

  1. Switch between app (as you did before)
  2. Move focus from an Editor tab
  3. File | Synchronize

As for the webpack issue, I am moving this thread to WebStorm as they usually deal with this kind of problems.

0
Comment actions Permalink

>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)

0
Comment actions Permalink

Hi, is there a solution to this problem?

0
Comment actions Permalink

sorry, what problem?

0
Comment actions Permalink

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

0
Comment actions Permalink

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

0
Comment actions Permalink

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

0
Comment actions Permalink

what does your watcher look like? You need to make sure to set up the Output paths to refresh correctly to make this work

0

Please sign in to leave a comment.