反応ツールボックスのWebサイトから基本ボタン実装をコピーしましたが、反応ツールボックスのテーマにエラーが表示されるようです。エラーのスクリーンショットをご覧ください。React-Toolboxテーマエラー
マイindex.js
import React from 'react';
import ReactDOM from 'react-dom';
import { Button } from 'react-toolbox/lib/button';
ReactDOM.render(
<Button label="Hello World!" />,
document.getElementById('app')
);
マイwebpack.config.jsが
var HTMLWebpackPlugin = require('html-webpack-plugin');
var HTMLWebpackPluginConfig = new HTMLWebpackPlugin({
\t template: __dirname + '/app/index.html', \t
\t filename: 'index.html',
\t inject: 'body'
});
module.exports = {
\t entry: __dirname + '/app/index.js',
\t module: {
\t \t loaders: [
\t \t \t {
\t \t \t \t test: /\.js$/,
\t \t \t \t exclude: /node_modules/,
\t \t \t \t loader: 'babel-loader'
\t \t \t }
\t \t ]
\t },
\t output: {
\t \t filename: 'transformed.js',
\t \t path: __dirname+'/build'
\t },
\t plugins: [HTMLWebpackPluginConfig]
};
ファイルファイルとpackage.jsonファイル
{
"name": "react2",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "webpack",
"start": "webpack-dev-server"
},
"author": "",
"license": "ISC",
"dependencies": {
"react": "^15.4.2",
"react-dom": "^15.4.2",
"react-toolbox": "^2.0.0-beta.7"
},
"devDependencies": {
"babel-core": "^6.23.1",
"babel-loader": "^6.3.2",
"babel-preset-react": "^6.23.0",
"html-webpack-plugin": "^2.28.0",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.4.1"
}
}
私は何かが足りないのですか?すべてのウェブサイトにはnpm install --save react-toolbox
と書かれているので、それ以上のものはありません。
注 - npm build
は正常に動作します。 npm start
がエラーを返します。
案内してください:)