Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Use os-neutral path separators in regex (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
dguenther authored Jun 20, 2023
1 parent 7991c9c commit aee0b70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webpack/common/rules.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = [
{
test: /@ironfish\/sdk\/build\/src\/migrations\/data\/.*\.js$/,
test: /@ironfish[\\/]sdk[\\/]build[\\/]src[\\/]migrations[\\/]data[\\/].*\.js$/,
loader: 'string-replace-loader',
options: {
search: '__filename',
Expand All @@ -10,7 +10,7 @@ module.exports = [
// actual file.
// After bundling, __filename will resolve to the webpack-bundled file's name,
// something like index.js, so we can avoid this by replacing __filename with the original filename.
return `'${this.resource.toString()}'`
return `'${this.resource.toString().replaceAll('\\', '\\\\')}'`
},
flags: 'g',
},
Expand All @@ -19,7 +19,7 @@ module.exports = [
{
// We're specifying native_modules in the test because the asset relocator loader generates a
// "fake" .node file which is really a cjs file.
test: /native_modules\/.+\.node$/,
test: /native_modules[\\/].+\.node$/,
use: 'node-loader',
},
{
Expand Down

1 comment on commit aee0b70

@vercel
Copy link

@vercel vercel bot commented on aee0b70 Jun 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wallet-app – ./

wallet-app-foo.vercel.app
wallet-app-ironfish.vercel.app
wallet-app-git-master-ironfish.vercel.app

Please sign in to comment.