2017-02-04 2 views
1

나는 angularclass.com의 코스를 수강 중입니다. 프로젝트를 실행하려고하면 지시에 따라 다음과 같은 오류가 발생합니다. 누군가이 오류의 의미와 해결 방법을 이해하도록 도와 줄 수 있습니까?webpack으로 각도 2 (정의되지 않은 'exclude'속성을 읽을 수 없음)

enter image description here

Webconfig 파일 : NPM 설치 한 후

var path = require('path'); 
var webpack = require('webpack'); 

var config = { 
    cache: true, 
    devtool: 'source-map', 
    entry: { 
    polyfills: './src/polyfills', 
    vendor: './src/vendor', 
    main:  './src/main' 
    }, 

    output: { 
    path: path.join(__dirname, 'dist'), 
    filename: '[name].bundle.js', 
    sourceMapFilename: '[name].map', 
    chunkFilename: '[id].chunk.js' 
    }, 
    module: { 
    loaders: [ 
     { test: /\.ts$/, loader: 'awesome-typescript-loader' }, 
     { test: /\.json$/, loader: 'json-loader' }, 
     { test: /\.html/, loader: 'raw-loader' }, 
     { test: /\.css$/, loader: 'to-string-loader!css-loader' }, 
    ] 
    }, 

    plugins: [ 
    new webpack.optimize.CommonsChunkPlugin({ name: ['polyfills', 'vendor', 'main'].reverse(), minChunks: Infinity }), 
    ], 

    resolve: { 
    extensions: ['', '.ts', '.js', '.json'] 
    }, 

    devServer: { 
    historyApiFallback: true, 
    watchOptions: { aggregateTimeout: 300, poll: 1000 } 
    }, 

    node: { 
    global: true, 
    process: true, 
    Buffer: false, 
    crypto: 'empty', 
    module: false, 
    clearImmediate: false, 
    setImmediate: false, 
    clearTimeout: true, 
    setTimeout: true 
    } 
}; 
module.exports = config; 
+0

웹팩 설정을 보여주는 마음입니까? – harshes53

+0

@ harshes53 내가 질문을 업데이트했습니다 –

+0

이 [이슈] (https://github.com/s-panferov/awesome-typescript-loader/issues/190)를 확인하고 싶을 수도 있습니다 – harshes53

답변

1

당신은 명시 적으로 멋진-타이프 라이터 로더를 설치해야합니다.

+0

이 나를 위해 일했다. 감사 –

관련 문제