diff options
author | Michael C <[email protected]> | 2023-03-24 17:40:29 -0400 |
---|---|---|
committer | Michael C <[email protected]> | 2023-03-24 17:40:29 -0400 |
commit | 4db3343029c6ab115cb256c6d7f742a1e2f2d3ad (patch) | |
tree | e7838259ab360e21c1e5eff81aebba911ce372fc /webpack/webpack.common.js | |
parent | 5711e70dbbfcc8697d88421bf543109d6d8d0b30 (diff) | |
download | SponsorBlock-4db3343029c6ab115cb256c6d7f742a1e2f2d3ad.tar.gz SponsorBlock-4db3343029c6ab115cb256c6d7f742a1e2f2d3ad.zip |
fix paths for windows dev
Diffstat (limited to 'webpack/webpack.common.js')
-rw-r--r-- | webpack/webpack.common.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js index b33278f5..e154d7c6 100644 --- a/webpack/webpack.common.js +++ b/webpack/webpack.common.js @@ -117,7 +117,7 @@ module.exports = env => { } }, { - test: /js\/document\.js$/, + test: /js(\/|\\)document\.js$/, type: 'asset/source' } ] @@ -141,7 +141,7 @@ module.exports = env => { }, context: './public', filter: async (path) => { - if (path.match(/\/_locales\/.+/)) { + if (path.match(/(\/|\\)_locales(\/|\\).+/)) { if (env.browser.toLowerCase() === "edge" && !edgeLanguages.includes(path.match(/(?<=\/_locales\/)[^/]+(?=\/[^/]+$)/)[0])) { return false; @@ -156,7 +156,7 @@ module.exports = env => { } }, transform(content, path) { - if (path.match(/\/_locales\/.+/)) { + if (path.match(/(\/|\\)_locales(\/|\\).+/)) { const parsed = JSON.parse(content.toString()); if (env.browser.toLowerCase() === "safari") { parsed.fullName.message = parsed.fullName.message.match(/^.+(?= -)/)?.[0] || parsed.fullName.message; |