Skip to content

Commit

Permalink
Merge pull request #1002 from basics/feature/remove-serialize-to-js
Browse files Browse the repository at this point in the history
fix(module): remove `serialize-to-js`
  • Loading branch information
ThornWalli authored Apr 30, 2024
2 parents b90ddc4 + 396afde commit 99e6ace
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 99e6ace

Please sign in to comment.