1
を使用しているとき、私はWebPACKのを使用して+ + nodejsを反応させ、これが私のWebPACKの設定ファイルですよモジュール「FS」を見つけることができませんブラウザでモジュール "fs"を見つけてください。不明なエラー:</p> <p>私はブラウザ上でWebサイトを開いたときに、それが不明なエラーを返します:することはできませんWebPACKの
var webpack = require('webpack');
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: [
'script-loader!./public/js/vendor/jquery.js',
'script-loader!./public/js/vendor/foundation.min.js',
'script-loader!./public/js/app.js',
'./view/app.jsx',
'./view/styles/main.scss'
],
externals: {
jquery: 'jQuery'
},
plugins: [
new ExtractTextPlugin({
filename: './public/styles/bundle.css',
allChunks: true,
}),
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery'
})
],
output: {
path: __dirname,
filename: './public/bundle.js'
},
resolve: {
alias: {
view: path.join(__dirname, 'view'),
componentDir: path.join(__dirname, 'view/components/'),
configureStore: path.resolve(__dirname, 'view/store/configureStore/'),
actions: path.resolve(__dirname, 'view/actions/index/')
},
extensions: ['.js', '.jsx']
},
module: {
rules: [
...
]
}
};
問題はどこですか?
これは本当ですが、ブラウザのコンソールで別のエラーが発生します(Uncaught TypeError:未定義のプロパティ 'prototype'を読み取ることができません )。私は別のプロジェクトでこのコードを使用していて、それは魅力的に機能しています... –
エラーソース:var fs $ ReadStream = fs.ReadStream ReadStream.prototype = Object.create(fs $ ReadStream.prototype) –
package/node_moduleはどこから由来していますか? – chautelly