mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
mascara - server - server bundles before static assets + serve dist/mascara instead of chrome
This commit is contained in:
parent
f35356a89a
commit
cbfee0ac7e
@ -15,22 +15,21 @@ function createMetamascaraServer () {
|
||||
const uiBundle = createBundle(path.join(__dirname, '/../src/ui.js'))
|
||||
const backgroundBuild = createBundle(path.join(__dirname, '/../src/background.js'))
|
||||
|
||||
// serve bundles
|
||||
// setup server
|
||||
const server = express()
|
||||
server.use(compression())
|
||||
|
||||
// ui window
|
||||
serveBundle(server, '/scripts/ui.js', uiBundle)
|
||||
server.use(express.static(path.join(__dirname, '/../ui/'), { setHeaders: (res) => res.set('X-Frame-Options', 'DENY') }))
|
||||
server.use(express.static(path.join(__dirname, '/../../dist/chrome')))
|
||||
// metamascara
|
||||
// serve bundles
|
||||
serveBundle(server, '/metamascara.js', metamascaraBundle)
|
||||
// proxy
|
||||
serveBundle(server, '/scripts/ui.js', uiBundle)
|
||||
serveBundle(server, '/scripts/proxy.js', proxyBundle)
|
||||
server.use('/', express.static(path.join(__dirname, '/../proxy')))
|
||||
// background
|
||||
serveBundle(server, '/scripts/background.js', backgroundBuild)
|
||||
|
||||
// serve assets
|
||||
server.use(express.static(path.join(__dirname, '/../ui/'), { setHeaders: (res) => res.set('X-Frame-Options', 'DENY') }))
|
||||
server.use(express.static(path.join(__dirname, '/../../dist/mascara')))
|
||||
server.use(express.static(path.join(__dirname, '/../proxy')))
|
||||
|
||||
return server
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user