Webpack не видит решение

527
26 февраля 2017, 10:15

Не могу решить проблему. Webpack не видит решение.

webpack.config.js

var webpack = require('webpack');
module.exports = {
    entry: "./app/main.js",
    output: {
        path: __dirname + '/dist/js/',
        publicPath: "js/",
        filename: "bundle.js"
    },
    module: {
        loaders: [
            {
                test: /\.js$/,
                loader: "babel-loader",
                exclude: [/node_modules/, /dist/],
                query: {
                    presets: ['es2015', 'react']
                }
            }, {
                test: /\.css$/,
                loader: "style-loader!css-loader!autoprefixer-loader",
                exclude: [/node_modules/, /dist/]
            }, {
                test: /\.scss$/,
                loader: "style-loader!css-loader!autoprefixer-loader!sass-loader",
                exclude: [/node_modules/, /dist/]
            }, {
                test: /\.gif$/,
                loader: "url-loader?limit=10000&mimetype=image/gif"
            }, {
                test: /\.jpg$/,
                loader: "url-loader?limit=10000&mimetype=image/jpg"
            }, {
                test: /\.png$/,
                loader: "url-loader?limit=10000&mimetype=image/png"
            }, {
                test: /\.svg/,
                loader: "url-loader?limit=26000&mimetype=image/svg+xml"
            }, {
                test: /\.jsx$/,
                loader: "react-hot-loader!babel-loader",
                exclude: [/node_modules/, /dist/],
                query: {
                    presets: ['es2015', 'react']
                }
            }, {
                test: /\.json$/,
                loader: "json-loader"
            }
        ]
    }
}

package.json

{
  "name": "currency_calc",
  "version": "1.0.0",
  "description": "Currency calculator",
  "main": "main.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "devserver": "webpack-dev-server --debug --hot --devtool eval-source-map --output-pathinfo --watch --colors --inline --content-base dist --port 8080 --host 127.0.0.1"
  },
  "keywords": [
    "currency"
  ],
  "author": "Oleg Ovcharenko",
  "license": "ISC",
  "dependencies": {
    "react": "^15.4.2",
    "react-dom": "^15.4.2"
  },
  "devDependencies": {
    "autoprefixer-loader": "^3.2.0",
    "babel": "^6.23.0",
    "babel-core": "^6.23.1",
    "babel-loader": "^6.3.2",
    "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0",
    "babel-preset-es2015": "^6.22.0",
    "babel-preset-react": "^6.23.0",
    "css-loader": "^0.26.2",
    "file-loader": "^0.10.0",
    "json-loader": "^0.5.4",
    "node-sass": "^4.5.0",
    "react-hot-loader": "^1.3.1",
    "sass-loader": "^6.0.2",
    "style-loader": "^0.13.2",
    "url-loader": "^0.5.8",
    "webpack": "^2.2.1",
    "webpack-dev-server": "^2.4.1"
  }
}

Ошибка

PS C:\Projects\currency_calc> webpack
(node:5572) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
Hash: cbea4201cef57d158056
Version: webpack 2.2.1
Time: 11034ms
    Asset    Size  Chunks                    Chunk Names
bundle.js  725 kB       0  [emitted]  [big]  main
   [5] ./~/react-dom/lib/ReactDOMComponentTree.js 6.27 kB {0} [built]
   [6] ./~/fbjs/lib/ExecutionEnvironment.js 1.06 kB {0} [built]
   [8] ./~/react-dom/lib/ReactInstrumentation.js 601 bytes {0} [built]
  [10] ./~/react-dom/lib/ReactUpdates.js 9.53 kB {0} [built]
  [19] ./~/react/lib/React.js 2.69 kB {0} [built]
  [79] ./~/react-dom/index.js 59 bytes {0} [built]
  [80] ./~/react/react.js 56 bytes {0} [built]
 [108] ./~/react-dom/lib/ReactDOM.js 5.14 kB {0} [built]
 [168] ./~/react/lib/ReactChildren.js 6.19 kB {0} [built]
 [169] ./~/react/lib/ReactClass.js 26.5 kB {0} [built]
 [170] ./~/react/lib/ReactDOMFactories.js 5.53 kB {0} [built]
 [171] ./~/react/lib/ReactPropTypes.js 15.8 kB {0} [built]
 [172] ./~/react/lib/ReactPureComponent.js 1.32 kB {0} [built]
 [173] ./~/react/lib/ReactVersion.js 350 bytes {0} [built]
 [177] ./app/main.js 476 bytes {0} [built]
    + 163 hidden modules
ERROR in ./app/main.js
Module not found: Error: Can't resolve 'react-hot-loader!babel-loader' in 'C:\Projects\currency_calc'
 @ ./app/main.js 13:23-67
READ ALSO
Как перевести таблицу в массив js

Как перевести таблицу в массив js

Есть таблица таблица

224
Анимация заголовка вдоль края страницы

Анимация заголовка вдоль края страницы

В учебнике написана задача:

937
Активировать при наведении курсора

Активировать при наведении курсора

На странице есть много блоков <pre>текст</pre>Нужен скрипт, который при наведении курсора мыши и если дотронуться пальцем до блока, внутри...

329