Skip to content

Commit e88dfad

Browse files
committed
no import maps on production build
1 parent a860076 commit e88dfad

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

package/scripts/common/quarto

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ else
3333
fi
3434
QUARTO_SRC_PATH="$QUARTO_ROOT/src"
3535
DEV_PATH=$QUARTO_SRC_PATH/quarto.ts
36-
QUARTO_IMPORT_MAP_ARG=--importmap=$QUARTO_SRC_PATH/import_map.json
3736

3837
if [ -f "$DEV_PATH" ]; then
38+
QUARTO_DEV_MODE=true
39+
QUARTO_IMPORT_MAP_ARG=--importmap=$QUARTO_SRC_PATH/import_map.json
3940
if [ "$1" == "--version" ] || [ "$1" == "-v" ]; then
4041
if [ "$QUARTO_FORCE_VERSION" != "" ]; then
4142
echo $QUARTO_FORCE_VERSION
@@ -88,7 +89,6 @@ if [ -f "$DEV_PATH" ]; then
8889
fi
8990

9091
else
91-
9292
QUARTO_ACTION=run
9393
QUARTO_TARGET=${SCRIPT_PATH}/quarto.js
9494
export QUARTO_BIN_PATH=$SCRIPT_PATH
@@ -192,5 +192,9 @@ if [ "$QUARTO_TS_PROFILE" != "" ]; then
192192
QUARTO_DENO_EXTRA_OPTIONS="--inspect-brk ${QUARTO_DENO_EXTRA_OPTIONS}"
193193
QUARTO_TS_PROFILE=true "${QUARTO_DENO}" ${QUARTO_ACTION} ${QUARTO_DENO_OPTIONS} ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_MAP_ARG}" "${QUARTO_TARGET}" "$@"
194194
else
195-
"${QUARTO_DENO}" ${QUARTO_ACTION} ${QUARTO_DENO_OPTIONS} ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_MAP_ARG}" "${QUARTO_TARGET}" "$@"
195+
if [ "$QUARTO_DEV_MODE" == true ]; then
196+
"${QUARTO_DENO}" ${QUARTO_ACTION} ${QUARTO_DENO_OPTIONS} ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_MAP_ARG}" "${QUARTO_TARGET}" "$@"
197+
else
198+
"${QUARTO_DENO}" ${QUARTO_ACTION} ${QUARTO_DENO_OPTIONS} ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_TARGET}" "$@"
199+
fi
196200
fi

0 commit comments

Comments
 (0)