原始仓库mpvue-loader。
添加了对TS支持,使用参考generator-mpvue-project
添加webpack配置的plugin
new webpack.LoaderOptionsPlugin({
test: /\.(vue|ts)$/,
options: {
ts: {
appendTsSuffixTo: [/\.vue$/]
}
}
})
添加webpack配置的rule
{
test: /\.ts$/,
use: [
{
loader: 'babel-loader'
},
{
loader: 'mpvue-ts-loader',
options: {
checkMPEntry: true
}
}
]
}