use bundle.js.map

This commit is contained in:
monoid 2021-01-08 10:45:17 +09:00
parent 74a4d01fcc
commit 541de21e66
2 changed files with 5 additions and 1 deletions

View File

@ -35,9 +35,12 @@ async function main(){
}); });
router.get('/dist/js/bundle.js',async (ctx,next)=>{ router.get('/dist/js/bundle.js',async (ctx,next)=>{
ctx.type = "js"; ctx.type = "js";
//ctx.set("","");
ctx.body = createReadStream("dist/js/bundle.js"); ctx.body = createReadStream("dist/js/bundle.js");
}); });
router.get('/dist/js/bundle.js.map',async (ctx,next)=>{
ctx.type = "text";
ctx.body = createReadStream("dist/js/bundle.js.map");
});
router.get('/doc/:rest(.*)' router.get('/doc/:rest(.*)'
,async (ctx,next)=>{ ,async (ctx,next)=>{
ctx.type = "html"; ctx.type = "html";

View File

@ -26,6 +26,7 @@ module.exports = ()=>{return {
new MiniCssExtractPlugin({ new MiniCssExtractPlugin({
"filename":'../css/style.css'}) "filename":'../css/style.css'})
], ],
devtool: 'source-map',
resolve: { resolve: {
extensions: ['.js','.css','.ts','.tsx'] extensions: ['.js','.css','.ts','.tsx']
}, },