Skip to content

Custom Properties on webpack config will be no longer allowed after beta.22 #613

Description

@TheLarkInn

See: webpack/webpack#2974

I know that you guys are not yet on webpack2. But I wanted to make ya'll are aware that we will start validating the configuration out of the box, and will prohibit custom properties on ones webpack config. You can see the migration path on the issue but I'll leave it here anyways.

Users now will need to use LoaderOptionsPlugin({}). Therefore the following example:

module.exports = config;

const config = {
  entry: './src/index.js',
  output: {
    filename: 'foo.chunk.js',
    path: './dist'
  },
  sassLoader: {
    includePaths: [
      /*...*/
    ]
  }

};

Will need to be migrated to look as follows:

const webpack = require('webpack');

module.exports = config;

const customLoaderOptions = {
  sassLoader: {
      includePaths: [
        /*...*/
      ]
    }
};

const config = {
  plugins: [
    webpack.LoaderOptionsPlugin({
      options: customLoaderOptions;
    });
  ]
};

Keep up all the good work. You guys are doing a great job for the community.

Activity

  1. gaearon commented on Sep 30, 2016

    @gaearon
    Contributor

    Thanks for the heads-up. Linked to this issue from #183 so I’ll close it.

  2. locked and limited conversation to collaborators on Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions