1

(写真提供)webpack iのチュートリアルに従っていますが、ポート8080を打つとコンポーネントテンプレートではなく、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のためのサーバの外観は、私は、非常に論理的、動きを発見した全体の構造を表示する理由のthats dist.htmlからのindex.html(これはhtml-webpack-pluginを使っていなかった)50ポイントを失った:(賞金のため

関連する問題