31 lines
639 B
JavaScript
31 lines
639 B
JavaScript
var path = require("path")
|
|
var htmlWebpackPlugin = require('html-webpack-plugin')
|
|
module.exports={
|
|
entry:{
|
|
main:'./src/script/main.ts',
|
|
},
|
|
output:{
|
|
|
|
filename:'js/[name].js',
|
|
path: path.resolve(__dirname, './dist'),
|
|
// publicPath:'http://www.qq.com'
|
|
},
|
|
resolve: {
|
|
extensions: [".ts", ".tsx", ".js"]
|
|
},
|
|
module: {
|
|
rules: [
|
|
|
|
{ test: /\.tsx?$/, loader: "ts-loader" }
|
|
]
|
|
},
|
|
plugins:[
|
|
new htmlWebpackPlugin(
|
|
{ filename:'index.html',
|
|
template:'index.html',
|
|
|
|
}
|
|
)
|
|
]
|
|
|
|
} |