2017-09-12 10 views
3

내가 얻고 웹팩을 실행하는 경우 다음웹팩 3 스키마 유틸 오류

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"), 
    ] 
}; 

답변

6

extract-text-webpack-plugin이되지 않는 한 다음과 같은 옵션 :

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

    이 내 설정이다

  • fallbackLoader이되었습니다. fallback
  • loaderuse으로 대체되어야합니다.

출처 : https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/569