summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-08-30 10:44:14 -0300
committerSebastian <sebasjm@gmail.com>2021-08-30 10:44:20 -0300
commit80e45b024af196eaf97bbcdbc10118ada74c42ee (patch)
tree60f7008208d9dd353e3a01344897d314e4f11021
parentacbc02e744ae2e7bd496095298367465481ff7d6 (diff)
downloadmerchant-backoffice-80e45b024af196eaf97bbcdbc10118ada74c42ee.tar.gz
merchant-backoffice-80e45b024af196eaf97bbcdbc10118ada74c42ee.tar.bz2
merchant-backoffice-80e45b024af196eaf97bbcdbc10118ada74c42ee.zip
bulid single with merchant backend
-rw-r--r--build-system/Makefile3
-rw-r--r--packages/backend/rollup.config.js13
2 files changed, 13 insertions, 3 deletions
diff --git a/build-system/Makefile b/build-system/Makefile
index cf3c157..7702683 100644
--- a/build-system/Makefile
+++ b/build-system/Makefile
@@ -37,7 +37,8 @@ build:
.PHONY: build
build-single:
pnpm run build-single --filter merchant-backoffice
- @echo Build done, result at: 'packages/frontend/single/index.html'
+ pnpm run build --filter merchant-backend
+ @echo Build done, result at: 'packages/frontend/single/index.html' packages/backend/dist/pages/*html
.PHONY: submodules-update
submodules-update:
diff --git a/packages/backend/rollup.config.js b/packages/backend/rollup.config.js
index fd8da74..aeb6077 100644
--- a/packages/backend/rollup.config.js
+++ b/packages/backend/rollup.config.js
@@ -24,6 +24,7 @@ import ts from "@rollup/plugin-typescript";
import replace from "@rollup/plugin-replace";
import css from 'rollup-plugin-css-only';
import html from '@rollup/plugin-html';
+import commonjs from "@rollup/plugin-commonjs";
@@ -42,9 +43,10 @@ const template = async ({
<title>${title}</title>
${css}
</head>
- <script id="built_time_data" />
+ <script id="built_time_data">
+ </script>
<body>
- <div id="built_time_data"/>
+ <div id="built_time_data" />
<div id="container_without_js">
${page}
</div>
@@ -68,6 +70,13 @@ const makePlugins = (name) => [
preventAssignment: true,
}),
+ commonjs({
+ include: [/node_modules/, /dist/],
+ extensions: [".js"],
+ ignoreGlobal: true,
+ sourceMap: true,
+ }),
+
nodeResolve({
browser: true,
preferBuiltins: true,