"fallbackLoader option has been deprecated - replace with "fallback""

An Angular CLI PR has been committed to address these warnings, so this issue should be addressed in 1.0.0-beta.31 and up.

To address these warnings now, you can make the following changes to the webpack configuration:

loader:          -->  use:
fallbackLoader:  -->  fallback:

Note: if you re-install node_modules you'll need to re-do these changes.

Details

For Angular CLI 1.0.0-beta.30, in node_modules/@angular/cli/models/webpack-configs/styles.js find the global style path section and change it from:

    loader: [
      ("css-loader?" + JSON.stringify({ sourceMap: cssSourceMap })),
    ].concat(commonLoaders, loaders),

    fallbackLoader: 'style-loader',

    publicPath: ''

to:

    use: [
      ("css-loader?" + JSON.stringify({ sourceMap: cssSourceMap })),
    ].concat(commonLoaders, loaders),

    fallback: 'style-loader',

    publicPath: ''

For Angular CLI 1.0.0-beta.26, in ./node_modules/angular-cli/models/webpack-build-styles.js find the global style path section and change it from:

    loader: ['css-loader'].concat(commonLoaders, loaders),

    fallbackLoader: 'style-loader',

    publicPath: ''

to:

    use: ['css-loader'].concat(commonLoaders, loaders),

    fallback: 'style-loader',

    publicPath: ''

For those who are using Angular CLI 1.0.0-beta.26, the correct path to identify and fix this problem is:

node_modules/angular-cli/models/webpack-configs/styles.js

You should see this:

// load global css as css files
if (globalStylePaths.length > 0) {
    rules.push.apply(rules, baseRules.map(function (_a) {
        var test = _a.test, loaders = _a.loaders;
        return ({
            include: globalStylePaths, test: test, loaders: ExtractTextPlugin.extract({
                loader: [
                    // css-loader doesn't support webpack.LoaderOptionsPlugin properly,
                    // so we need to add options in its query
                    ("css-loader?" + JSON.stringify({ sourceMap: cssSourceMap }))
                ].concat(commonLoaders, loaders),
                fallbackLoader: 'style-loader',
                // publicPath needed as a workaround https://github.com/angular/angular-cli/issues/4035
                publicPath: ''
            })
        });
    }));
}
  • Change the loader to use, and the fallbackLoader to fallback

  • Note also that this has been fixed in the latest release.