From 541de21e66883e059bba70dcd26e2b6a7778a7cb Mon Sep 17 00:00:00 2001 From: monoid Date: Fri, 8 Jan 2021 10:45:17 +0900 Subject: [PATCH] use bundle.js.map --- src/server.ts | 5 ++++- webpack.config.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server.ts b/src/server.ts index 333e745..d7aba7a 100644 --- a/src/server.ts +++ b/src/server.ts @@ -35,9 +35,12 @@ async function main(){ }); router.get('/dist/js/bundle.js',async (ctx,next)=>{ ctx.type = "js"; - //ctx.set("",""); 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(.*)' ,async (ctx,next)=>{ ctx.type = "html"; diff --git a/webpack.config.js b/webpack.config.js index 9ef04f9..655cb81 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -26,6 +26,7 @@ module.exports = ()=>{return { new MiniCssExtractPlugin({ "filename":'../css/style.css'}) ], + devtool: 'source-map', resolve: { extensions: ['.js','.css','.ts','.tsx'] },