@marko/vite 3.1.0 → 3.1.2

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/index.js CHANGED
@@ -416,7 +416,7 @@ function markoPlugin(opts = {}) {
416
416
  cachedSources.set(id, source);
417
417
  }
418
418
  if (!query) {
419
- if (/[\\/]node_modules[\\/]/.test(id) && getModuleType(id) === "cjs") {
419
+ if (!isBuild && /[\\/]node_modules[\\/]/.test(id) && getModuleType(id) === "cjs") {
420
420
  const { ast } = await compiler.compile(source, id, {
421
421
  cache,
422
422
  ast: true,
@@ -680,7 +680,7 @@ function stripVersionAndTimeStamp(id) {
680
680
  if (queryStart === -1)
681
681
  return id;
682
682
  const url = id.slice(0, queryStart);
683
- const query = id.slice(queryStart + 1).replace(/(?:^|[&])[vt]=[^&]/g, "");
683
+ const query = id.slice(queryStart + 1).replace(/(?:^|[&])[vt]=[^&]+/g, "");
684
684
  if (query)
685
685
  return `${url}?${query}`;
686
686
  return url;
package/dist/index.mjs CHANGED
@@ -396,7 +396,7 @@ function markoPlugin(opts = {}) {
396
396
  cachedSources.set(id, source);
397
397
  }
398
398
  if (!query) {
399
- if (/[\\/]node_modules[\\/]/.test(id) && getModuleType(id) === "cjs") {
399
+ if (!isBuild && /[\\/]node_modules[\\/]/.test(id) && getModuleType(id) === "cjs") {
400
400
  const { ast } = await compiler.compile(source, id, {
401
401
  cache,
402
402
  ast: true,
@@ -660,7 +660,7 @@ function stripVersionAndTimeStamp(id) {
660
660
  if (queryStart === -1)
661
661
  return id;
662
662
  const url = id.slice(0, queryStart);
663
- const query = id.slice(queryStart + 1).replace(/(?:^|[&])[vt]=[^&]/g, "");
663
+ const query = id.slice(queryStart + 1).replace(/(?:^|[&])[vt]=[^&]+/g, "");
664
664
  if (query)
665
665
  return `${url}?${query}`;
666
666
  return url;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@marko/vite",
3
3
  "description": "A Marko plugin for Vite",
4
- "version": "3.1.0",
4
+ "version": "3.1.2",
5
5
  "author": "Dylan Piercey <dpiercey@ebay.com>",
6
6
  "bugs": "https://github.com/marko-js/vite/issues",
7
7
  "dependencies": {