Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/325.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Maven和webpack热交换和IntelliJ_Javascript_Java_Eclipse_Maven_Intellij Idea - Fatal编程技术网

Javascript Maven和webpack热交换和IntelliJ

Javascript Maven和webpack热交换和IntelliJ,javascript,java,eclipse,maven,intellij-idea,Javascript,Java,Eclipse,Maven,Intellij Idea,我有一个网页包文件,例如: module.export = { entry: { ... }, output: { ... }, devtool: process.env.NODE_ENV === 'dev' ? 'source-map' : false, cache: !(process.env.NODE_ENV === 'dev'), module: { loaders: [{ test: /\.(js|jsx)$/,

我有一个网页包文件,例如:

module.export = {
    entry: { ... },
    output: { ... },
    devtool: process.env.NODE_ENV === 'dev' ? 'source-map' : false,
    cache: !(process.env.NODE_ENV === 'dev'),
    module: { loaders: [{
        test: /\.(js|jsx)$/,
        exclude: 'node_modules',
        loader: 'babel-loader',
        query: { presets: [ 'es2015', 'react' ] }
    }]}
}
和一个maven pom文件:

...
<build>
    <plugins>
        <plugin>
            <groupId>com.github.eirslett</groupId>
            <artifactId>frontend-maven-plugin</artifactId>
            <version>1.2</version>
            <executions>
                <execution>
                    <id>install node and npm</id>
                    <goals>
                        <goal>install-node-and-npm</goal>
                    </goals>
                    <configuration>
                        <nodeVersion>v4.4.5</nodeVersion>
                        <npmVersion>3.9.2</npmVersion>
                    </configuration>
                </execution>
                <execution>
                    <id>npm install</id>
                    <goals>
                        <goal>npm</goal>
                    </goals>
                    <configuration>
                        <arguments>install</arguments>
                        <installDirectory>target</installDirectory>
                    </configuration>
                </execution>
                <execution>
                    <id>webpack build</id>
                    <goals>
                        <goal>webpack</goal>
                    </goals>
                    <configuration>
                        <environmentVariables>
                            <environment>${profile}</environment> <!-- dev -->
                        </environmentVariables>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
...
。。。
com.github.eirslett
前端maven插件
1.2
安装节点和npm
安装节点和npm
v4.4.5
3.9.2
npm安装
npm
安装
目标
网页包构建
网页包
${profile}
...
目前的结果是,每次在eclipse中进行更改时,我都必须刷新项目(在IntelliJ中,我甚至不知道如何刷新,我也不知道如何解决这个问题),以便查看在babel(javascript)中所做的更改。这会触发一个新的
webpack
build,因为它包含大量的js文件,可能需要10-20秒。我不知道如何在开发过程中运行类似于
webpack的东西——观看

我的问题有两个方面

1) 如何在IntelliJ中实现eclipse的“刷新”功能

2) 如何热交换JS文件,以及如何在开发过程中使其速度更快

抱歉,如果信息不充分,欢迎提供任何信息,甚至其他答案。我想问更详细的问题,但我不知道从哪里开始。谢谢