Skip to content

Commit

Permalink
fix: enable inline sourcemaps by default with dev mode require hook
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Jan 27, 2021
1 parent 2c37386 commit 6571a11
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/marko/src/node-require/index.js
Expand Up @@ -6,6 +6,8 @@ const resolveFrom = require("resolve-from");
const fs = require("fs");
const fsReadOptions = { encoding: "utf8" };
const requiredCompilerOptions = { modules: "cjs" };
// eslint-disable-next-line no-constant-condition
const defaultCompilerOptions = { sourceMaps: "MARKO_DEBUG" ? "inline" : false };
const MARKO_EXTENSIONS = Symbol("MARKO_EXTENSIONS");

function normalizeExtension(extension) {
Expand All @@ -23,6 +25,7 @@ function compile(templatePath, markoCompiler, userCompilerOptions) {
Object.assign(
{},
markoCompiler.defaultOptions,
defaultCompilerOptions,
userCompilerOptions,
requiredCompilerOptions
)
Expand Down

0 comments on commit 6571a11

Please sign in to comment.