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

Commit

Permalink
fix: properly alias fs at the package level, not dev
Browse files Browse the repository at this point in the history
  • Loading branch information
denolfe committed Feb 9, 2023
1 parent 20cfd61 commit e56518e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions dev/src/payload.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ export default buildConfig({
alias: {
...(config.resolve.alias || {}),
react: path.resolve(__dirname, '../node_modules/react'),
fs: path.resolve(__dirname, 'mocks/fileStub.js'),
util: path.resolve(__dirname, 'mocks/promisifyMock.js'),
'@azure/storage-blob': path.resolve(__dirname, '../../src/adapters/azure/mock.js'),
'@aws-sdk/client-s3': path.resolve(__dirname, '../../src/adapters/s3/mock.js'),
'@google-cloud/storage': path.resolve(__dirname, '../../src/adapters/gcs/mock.js'),
Expand Down
1 change: 1 addition & 0 deletions src/adapters/s3/fileStub.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default 'file-stub'
1 change: 1 addition & 0 deletions src/adapters/s3/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const extendWebpackConfig = (existingWebpackConfig: WebpackConfig): Webpa
...(existingWebpackConfig.resolve?.alias ? existingWebpackConfig.resolve.alias : {}),
'@aws-sdk/client-s3': path.resolve(__dirname, './mock.js'),
'@aws-sdk/lib-storage': path.resolve(__dirname, './mock.js'),
fs: path.resolve(__dirname, './fileStub.js'),
},
},
}
Expand Down

0 comments on commit e56518e

Please sign in to comment.