1
ウェブパック用のReactとホット・ローダー・プラグインを備えたRailsアプリケーションにWebpackセットアップがあります。正常に動作しており、私が期待しているファイルbundle.js
をビルドしていますが、ホットアップデートのたびにこのようなファイルを提供しています。0.bfeb31eda5c7e8da9473.hot-update.js
私が使用しているプラグインの1つの作者であるWriteFileWebpackPlugin
はtest
のプロパティで.hot
のファイルを見ないように言えると言っていましたが、それをどのように動作させるかわかりません。反応ホットロードとレールを備えたウェブパック
はここに私のwebpack.config.jsだ
var webpack = require('webpack')
var path = require('path')
var WriteFilePlugin = require('write-file-webpack-plugin')
module.exports = {
// watchOptions: {
// poll: true
// },
context: __dirname + '/app/assets/javascripts',
entry: {
App: [
'webpack-dev-server/client?http://localhost:8080/',
'webpack/hot/only-dev-server',
path.resolve(__dirname, 'app/assets/source/index.js')
]
},
output: {
path: path.resolve(__dirname, 'app/assets/javascripts'),
publicPath: 'http://localhost:8080/',
filename: 'bundle.js'
},
module: {
loaders: [
{ test: /\.js$/,
loaders: ["react-hot", "babel"],
include: path.resolve(__dirname, 'app/assets/source')
}
]
},
devtool: 'inline-source-map',
devServer: {
outputPath: path.resolve(__dirname, 'app/assets/javascripts')
},
plugins: [
new WriteFilePlugin({test: /^.*[^\.].*\.js$/}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
]
}
は、誰がこのに走っていますか?可能であれば、これがtest
プロパティなしで解決できるかどうかを判断するのが理想的ですが、それだけでも役立つと考えても理想的です。
私はこの設定は反応ホットローダーのv3のために時代遅れであると信じています –