preboot / angular-webpack

A complete, yet simple, starter for Angular v2+ using webpack
MIT License
1.29k stars 557 forks source link

Invalid configuration object #214

Closed jbeckton closed 7 years ago

jbeckton commented 7 years ago

I am trying to add come properties to the config.resolve object based on the documentation (http://webpack.github.io/docs/configuration.html#resolve) but getting "WebpackOptionsValidationError",

Here is the problem I am trying to fix ( http://webpack.github.io/docs/troubleshooting.html#npm-linked-modules-doesn-t-find-their-dependencies ).

here is my resolve config

config.resolve = { // only discover files that have those extensions extensions: ['.ts', '.js', '.json', '.css', '.scss', '.html'], fallback: path.join(__dirname, "node_modules") };

Here is the error

WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema. configuration.resolve has an unknown property 'fallback'. These properties are valid: object { alias?, aliasFields?, cachePredicate?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSystem?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, resolver?, symlinks?, unsafeCache? }

jbeckton commented 7 years ago

found the docs for the beta version...

/**
   * Resolve
   * Reference: http://webpack.github.io/docs/configuration.html#resolve
   */
  config.resolve = {
    // only discover files that have those extensions
    extensions: ['.ts', '.js', '.json', '.css', '.scss', '.html'],
    modules: [path.join(__dirname, "node_modules")]
  };