@marko/vite 2.2.9 → 2.2.10

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
@@ -259,7 +259,7 @@ function markoPlugin(opts = {}) {
259
259
  if (isBuild) {
260
260
  return html;
261
261
  }
262
- return html.replace(/src\s*=\s*(['"])(\\.|(?!\1).)*\.marko\1/gim, (m) => m.slice(0, -1) + browserEntryQuery + m.slice(-1));
262
+ return html.replace(/(src\s*=\s*(['"])(?:(?!\2).)*\.marko)(?:\?((?:(?!\2).)*))?\2/gim, (_, prefix, quote, query) => prefix + browserEntryQuery + (query ? "&" + query : "") + quote);
263
263
  },
264
264
  async transform(source, id, ssr) {
265
265
  const query = getMarkoQuery(id);
package/dist/index.mjs CHANGED
@@ -222,7 +222,7 @@ function markoPlugin(opts = {}) {
222
222
  if (isBuild) {
223
223
  return html;
224
224
  }
225
- return html.replace(/src\s*=\s*(['"])(\\.|(?!\1).)*\.marko\1/gim, (m) => m.slice(0, -1) + browserEntryQuery + m.slice(-1));
225
+ return html.replace(/(src\s*=\s*(['"])(?:(?!\2).)*\.marko)(?:\?((?:(?!\2).)*))?\2/gim, (_, prefix, quote, query) => prefix + browserEntryQuery + (query ? "&" + query : "") + quote);
226
226
  },
227
227
  async transform(source, id, ssr) {
228
228
  const query = getMarkoQuery(id);
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": "2.2.9",
4
+ "version": "2.2.10",
5
5
  "author": "Dylan Piercey <dpiercey@ebay.com>",
6
6
  "bugs": "https://github.com/marko-js/vite/issues",
7
7
  "dependencies": {