Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TheLarkInn opened this issue Sep 9, 2016 · 1 comment

Comments

@TheLarkInn
Copy link

TheLarkInn commented Sep 9, 2016

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.

@gaearon
Copy link
Contributor

gaearon commented Sep 30, 2016

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

@gaearon gaearon closed this as completed Sep 30, 2016
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants