@marko/compiler 5.22.6 → 5.22.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/register.js +8 -2
- package/package.json +1 -1
package/dist/register.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const compiler = require(".");
|
|
4
|
+
const shouldOptimize = require("./util/should-optimize").default;
|
|
4
5
|
const requiredOptions = { modules: "cjs" };
|
|
6
|
+
const isDev = !shouldOptimize();
|
|
5
7
|
|
|
6
8
|
module.exports = register;
|
|
7
9
|
register();
|
|
@@ -12,8 +14,12 @@ function register({ extensions = require.extensions, ...options } = {}) {
|
|
|
12
14
|
compiler.compileFileSync(
|
|
13
15
|
filename,
|
|
14
16
|
Object.assign(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
{
|
|
18
|
+
meta: true,
|
|
19
|
+
hot: process.env.BROWSER_REFRESH_URL !== undefined,
|
|
20
|
+
// eslint-disable-next-line no-constant-condition
|
|
21
|
+
sourceMaps: isDev ? "inline" : false },
|
|
22
|
+
|
|
17
23
|
options,
|
|
18
24
|
requiredOptions)).
|
|
19
25
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marko/compiler",
|
|
3
3
|
"description": "Marko template to JS compiler.",
|
|
4
|
-
"version": "5.22.
|
|
4
|
+
"version": "5.22.8",
|
|
5
5
|
"author": "Dylan Piercey <dpiercey@ebay.com>",
|
|
6
6
|
"bugs": "https://github.com/marko-js/marko/issues/new?template=Bug_report.md",
|
|
7
7
|
"dependencies": {
|