Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webpack 3 schema-utils error with no information

When running webpack I am getting the following:

/Users/nikos/WebstormProjects/quantumjs/node_modules/schema-utils/dist/validateOptions.js:40
    throw new _ValidationError2.default(ajv.errors, name);
    ^

false

This is my config:

var path = require("path");
var webpack = require("webpack");
var WebpackBuildNotifierPlugin = require("webpack-build-notifier");
const ExtractTextPlugin = require("extract-text-webpack-plugin");

const PATHS = {
  src: path.join(__dirname, './src'),
  build: path.join(__dirname, './build')
};

module.exports = {

  entry: {
    "app": PATHS.src + '/index.ts'
  },
  output: {
    path: PATHS.build,
    filename: '[name].js',
    publicPath: '/'

  },
  devtool: "source-map",
  module: {
    loaders: [
      {
        test: /\.ts$/,
        loader: 'ts-loader'
      },
      {
        test: /\.p?css$/,
        use: ExtractTextPlugin.extract({
          fallbackLoader: "style-loader",
          loader: "css-loader?importLoaders=1,url=false!postcss-loader"
        })
      }
    ]
  },
  resolve: {
    // you can now require('file') instead of require('file.js')
    extensions: ['.ts', '.js','.pcss']
  },
  plugins: [
    new WebpackBuildNotifierPlugin({
      title: "My Project Webpack Build"
    }),
    new ExtractTextPlugin("app.css"),
  ]
};
like image 485
Nikos Avatar asked Sep 12 '17 08:09

Nikos


1 Answers

extract-text-webpack-plugin has deprecated following options:

  • fallbackLoader is now fallback
  • loader has to be replaced with use.

Source: https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/569#issuecomment-314881026

like image 143
Marek Dulowski Avatar answered Nov 04 '22 01:11

Marek Dulowski