From b8ec17f08ca92f2b472598f60f7177521104cf56 Mon Sep 17 00:00:00 2001 From: Liam Fitzgerald Date: Thu, 27 May 2021 11:28:55 +1000 Subject: [PATCH] btc-wallet: standardise build process --- pkg/arvo/app/glob.hoon | 8 ++++---- pkg/btc-wallet/config/webpack.prod.js | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pkg/arvo/app/glob.hoon b/pkg/arvo/app/glob.hoon index 6d8ceff73..65d45d174 100644 --- a/pkg/arvo/app/glob.hoon +++ b/pkg/arvo/app/glob.hoon @@ -5,8 +5,8 @@ /- glob, *resource /+ default-agent, verb, dbug |% -++ landscape-hash 0v3.l561u.f9a2b.cn958.ddf81.mc707 -++ btc-hash 0v9t022.n8kv1.5emkt.s2p9i.hvsa9 +++ landscape-hash 0v3.l561u.f9a2b.cn958.ddf81.mc707 +++ btc-wallet-hash 0v2.k8l6a.tqs6n.8cg1q.7t1e4.fis67 +$ state-0 [%0 hash=@uv glob=(unit (each glob:glob tid=@ta))] +$ state-1 [%1 =globs:glob] +$ all-states @@ -50,7 +50,7 @@ =. globs.state (~(put by globs.state) /'~landscape'/js/bundle landscape-hash ~) =. globs.state - (~(put by globs.state) /'~btc'/js/bundle btc-hash ~) + (~(put by globs.state) /'~btc'/js/bundle btc-wallet-hash ~) :: ^- agent:gall %+ verb | @@ -175,7 +175,7 @@ |= =path ^- (unit (unit cage)) ?+ path (on-peek:def path) - [%x %btc-wallet ~] ``noun+!>(btc-hash) + [%x %btc-wallet ~] ``noun+!>(btc-wallet-hash) == :: ++ on-agent diff --git a/pkg/btc-wallet/config/webpack.prod.js b/pkg/btc-wallet/config/webpack.prod.js index 216c7cb4d..84d04b6c2 100644 --- a/pkg/btc-wallet/config/webpack.prod.js +++ b/pkg/btc-wallet/config/webpack.prod.js @@ -42,12 +42,14 @@ module.exports = { resolve: { extensions: ['.js', '.ts', '.tsx'] }, - devtool: 'inline-source-map', + devtool: 'source-map', plugins: [ new CleanWebpackPlugin() ], output: { - filename: 'index.js', + filename: (pathData) => { + return pathData.chunk.name === 'app' ? 'index.[contenthash].js' : '[name].js'; + }, path: path.resolve(__dirname, `../../arvo/app/btc-wallet/js/bundle`), publicPath: '/', },