1

(그림 제공) webpack i에서 튜토리얼을 따라 왔지만 포트 8080을 치면 인스턴트 메신저를 사용하여 구성 요소 템플리트 대신 implements webpack -dev 서버 on localhost:8080webpack : 컴포넌트 템플릿 대신 localhost : 8080에 표시된 전체 프로젝트 구조

이것은

var webpack = require("webpack"); 
var htmlwebpack = require('html-webpack-plugin'); 

//consfiguring object 
module.exports = { 
entry : "./src/main.ts", 
output : { 
    path : "./dist", 
    filename : "app.bundle.js" 

}, 

//out first module for ts 
module : { 
loaders : [ 
    {test : /\.ts$/, loader : 'ts'} 
] 
}, 

//what extension should be look for 
resolve : { 
extensions : ['', '.ts','.js'] 
}, 

Plugin :[ 
new htmlwebpack({ 
    template : './src/index.html' 
}) 
] 
} 
+1

'webpack.config.js'를 게시하십시오. –

+0

업데이트 된 질문보기 – blackHawk

답변

1

webpack.config.js dist 파일 폴더에 있던 index.html을위한 서버보기는 내가 매우 논리적 이동을 발견 전체 구조를 표시하는 이유 이잖아 dist.html에서 index.html (html-webpack-plugin을 사용하여 defualt) 50 포인트를 잃었습니다. (현상금

관련 문제