Skip to content

Commit

Permalink
fix(module): remove serialize-to-js
Browse files Browse the repository at this point in the history
  • Loading branch information
ThornWalli committed Apr 30, 2024
1 parent b90ddc4 commit 396afde
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
1 change: 0 additions & 1 deletion build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default {
'htmlparser2',
'image-meta',
'pathe',
'serialize-to-js',
'sort-css-media-queries',
'vue3-lazy-hydration',
'mime-types',
Expand Down
9 changes: 0 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"htmlparser2": "9.1.0",
"image-meta": "0.2.0",
"pathe": "1.1.2",
"serialize-to-js": "3.1.2",
"sort-css-media-queries": "2.2.0",
"vue3-lazy-hydration": "1.2.1"
},
Expand Down
12 changes: 7 additions & 5 deletions src/utils/browser.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import serialize from 'serialize-to-js';
import { getUserAgentRegex } from 'browserslist-useragent-regexp';

function getSupportedBrowserDetector(ignore) {
if (ignore) {
return JSON.stringify({ regex: '' });
} else {
return serialize({
regex: getUserAgentRegex({
return JSON.stringify({
regex: 'value'
}).replace(
'"value"',
`new RegExp(${getUserAgentRegex({
allowHigherVersions: true,
allowZeroSubversions: true
})
});
})})`
);
}
}

Expand Down

0 comments on commit 396afde

Please sign in to comment.