私はReactのElectronで作業しています。これは、カーソルのための私のCSSプロパティの値である私は、電子は私のカスタムカーソルを得ることができない問題を抱えているが、それはなどのポインタ、進捗状況、のようなデフォルトのカーソルでうまく機能:ReactのElectronがカスタムカーソルを読み込めません
cursor: url('../../images/common/icon_cut.png');
これは私のエラーメッセージです:
0] ERROR in ./app/images/common/icon_cut.png
[0] Module parse failed: /Users/cuong/ops/ecode/skill-share/app/images/common/icon_cut.png Unexpected character '�' (1:0)
[0] You may need an appropriate loader to handle this file type. [0] SyntaxError: Unexpected character '�' (1:0)
これは
'use strict';
const webpack = require('webpack');
const path = require('path');
module.exports = {
module: {
loaders: [{
test: /\.jsx?$/,
loaders: ['babel-loader'],
exclude: /node_modules/
}, {
test: /\.json$/,
loader: 'json-loader'
}]
},
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
libraryTarget: 'commonjs2'
},
resolve: {
extensions: ['', '.js', '.jsx'],
packageMains: ['webpack', 'browser', 'web', 'browserify', ['jam', 'main'], 'main']
},
plugins: [
new webpack.optimize.DedupePlugin(),
],
externals: [
// put your node 3rd party libraries which can't be built with webpack here
// (mysql, mongodb, and so on..)
]
};
誰もが私の問題への解決策を知っている私のWebPACKの設定ですか?
あなたのWebPACK設定ファイルの内容を記載してください。そこにはおそらくエラーがあります。 – TylerH
おそらくあなたのJavaScriptがPNGを読み込もうとします –
私のwebpack設定ファイルの内容を追加しました – gintoki27