Начал проходить курс по вебпаку
https://learn.javascript.ru/screencast/webpack
Взял первый пример. Запускаю команду webpack в консоле, выдаёт следующую ошибку
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.resolve has an unknown property 'modulesDirectories'. These properties are valid:
object { alias?, aliasFields?, cachePredicate?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSystem?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, resolver?, symlinks?, unsafeCache?, useSyncFileSystemCalls? }
- configuration.resolve.extensions[0] should not be empty.
- configuration.resolveLoader has an unknown property 'moduleTemplates'. These properties are valid:
object { alias?, aliasFields?, cachePredicate?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSystem?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, resolver?, symlinks?, unsafeCache?, useSyncFileSystemCalls? }
- configuration.resolveLoader.extensions[0] should not be empty.
Решил поставить старую версию Webpack(1.8), но появилась следующая ошибка.
ERROR in ./home.js
Module build failed: ReferenceError: [BABEL] /var/www/training.ru/frontend/home.js: Using removed Babel 5 option: base.optional - Put the specific transforms you want in the `plugins` option
at Logger.error (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/logger.js:41:11)
at OptionManager.mergeOptions (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/options/option-manager.js:220:20)
at OptionManager.init (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/options/option-manager.js:367:12)
at File.initOptions (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/index.js:216:65)
at new File (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/index.js:139:24)
at Pipeline.transform (/var/www/training.ru/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at transpile (/var/www/training.ru/node_modules/babel-loader/lib/index.js:38:20)
at Object.module.exports (/var/www/training.ru/node_modules/babel-loader/lib/index.js:133:12)
ERROR in ./about.js
Module build failed: ReferenceError: [BABEL] /var/www/training.ru/frontend/about.js: Using removed Babel 5 option: base.optional - Put the specific transforms you want in the `plugins` option
at Logger.error (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/logger.js:41:11)
at OptionManager.mergeOptions (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/options/option-manager.js:220:20)
at OptionManager.init (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/options/option-manager.js:367:12)
at File.initOptions (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/index.js:216:65)
at new File (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/index.js:139:24)
at Pipeline.transform (/var/www/training.ru/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at transpile (/var/www/training.ru/node_modules/babel-loader/lib/index.js:38:20)
at Object.module.exports (/var/www/training.ru/node_modules/babel-loader/lib/index.js:133:12)
ERROR in ./common.js
Module build failed: ReferenceError: [BABEL] /var/www/training.ru/frontend/common.js: Using removed Babel 5 option: base.optional - Put the specific transforms you want in the `plugins` option
at Logger.error (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/logger.js:41:11)
at OptionManager.mergeOptions (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/options/option-manager.js:220:20)
at OptionManager.init (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/options/option-manager.js:367:12)
at File.initOptions (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/index.js:216:65)
at new File (/var/www/training.ru/node_modules/babel-core/lib/transformation/file/index.js:139:24)
at Pipeline.transform (/var/www/training.ru/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at transpile (/var/www/training.ru/node_modules/babel-loader/lib/index.js:38:20)
at Object.module.exports (/var/www/training.ru/node_modules/babel-loader/lib/index.js:133:12)
Что делать? Как это исправить?