<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>可爱的D3</title>
</head>
<body>
<ng2-d3>
数据加载中……
</ng2-d3>
<script src="./dist/bundle.js"></script>
</body>
</html>
var webpack = require('webpack');
var openBrowser = require('webpack-browser-plugin');
module.exports = {
entry: './src/main.ts',
output: {
filename: '/dist/bundle.js'
},
resolve: {
extensions: ['.ts', '.js']
},
module: {
loaders: [
{
test: /\.ts$/,
loader: 'ts-loader'
}
]
},
devServer: {
hot: true,
inline: true
},
plugins: [new openBrowser()]
};
运行中没有报错,但打开页面后报错了!
是不是少了什么配置?
学习是最好的投资!