Merge pull request #15371 from Budibase/exclude-sourcemaps-from-pro
Add string logging
This commit is contained in:
commit
53b9da4c89
|
@ -1 +1 @@
|
||||||
Subproject commit a4f63b22675e16dcdcaa4d9e83b298eee6466a07
|
Subproject commit 43a5785ccb4f83ce929b29f05ea0a62199fcdf23
|
|
@ -46,7 +46,10 @@ const svelteCompilePlugin = {
|
||||||
let { argv } = require("yargs")
|
let { argv } = require("yargs")
|
||||||
|
|
||||||
async function runBuild(entry, outfile) {
|
async function runBuild(entry, outfile) {
|
||||||
const isDev = process.env.NODE_ENV !== "production"
|
const isDev = !process.env.CI
|
||||||
|
|
||||||
|
console.log(`Building in mode dev mode: ${isDev}`)
|
||||||
|
|
||||||
const tsconfig = argv["p"] || `tsconfig.build.json`
|
const tsconfig = argv["p"] || `tsconfig.build.json`
|
||||||
|
|
||||||
const { data: tsconfigPathPluginContent } = loadTsConfig(
|
const { data: tsconfigPathPluginContent } = loadTsConfig(
|
||||||
|
@ -58,7 +61,7 @@ async function runBuild(entry, outfile) {
|
||||||
entryPoints: [entry],
|
entryPoints: [entry],
|
||||||
bundle: true,
|
bundle: true,
|
||||||
minify: !isDev,
|
minify: !isDev,
|
||||||
sourcemap: isDev,
|
sourcemap: tsconfigPathPluginContent.compilerOptions.sourceMap,
|
||||||
tsconfig,
|
tsconfig,
|
||||||
plugins: [
|
plugins: [
|
||||||
svelteCompilePlugin,
|
svelteCompilePlugin,
|
||||||
|
@ -125,10 +128,12 @@ async function runBuild(entry, outfile) {
|
||||||
|
|
||||||
await Promise.all([hbsFiles, mainBuild, oldClientVersions])
|
await Promise.all([hbsFiles, mainBuild, oldClientVersions])
|
||||||
|
|
||||||
fs.writeFileSync(
|
if (isDev) {
|
||||||
`dist/${path.basename(outfile)}.meta.json`,
|
fs.writeFileSync(
|
||||||
JSON.stringify((await mainBuild).metafile)
|
`dist/${path.basename(outfile)}.meta.json`,
|
||||||
)
|
JSON.stringify((await mainBuild).metafile)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
"\x1b[32m%s\x1b[0m",
|
"\x1b[32m%s\x1b[0m",
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
|
"sourceMap": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"@budibase/types": ["./packages/types/src"],
|
"@budibase/types": ["./packages/types/src"],
|
||||||
"@budibase/backend-core": ["./packages/backend-core/src"],
|
"@budibase/backend-core": ["./packages/backend-core/src"],
|
||||||
|
|
Loading…
Reference in New Issue