Skip to content

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

@TheLarkInn

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.

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