Skip to content

Commit

Permalink
Merge pull request #122 from sCrypt-Inc/fix_121
Browse files Browse the repository at this point in the history
Fix 121
  • Loading branch information
zhfnjust authored Jul 1, 2024
2 parents d947ead + fadae72 commit e9d73d6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 17 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scrypt-cli",
"version": "0.1.77",
"version": "0.1.78",
"description": "CLI tool for creating and managing sCrypt projects.",
"bin": {
"scrypt": "./src/bin/index.js",
Expand Down
40 changes: 26 additions & 14 deletions src/assets/config-overrides.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
const webpack = require('webpack');

module.exports = function override(config, env) {

config.resolve.fallback = {
fs: false,
os: false,
path: false,
module: false
}
config.resolve.fallback = {
fs: false,
os: false,
path: false,
module: false
}

const scopePluginIndex = config.resolve.plugins.findIndex(
({ constructor }) => constructor && constructor.name === 'ModuleScopePlugin'
);
const scopePluginIndex = config.resolve.plugins.findIndex(
({ constructor }) => constructor && constructor.name === 'ModuleScopePlugin'
);

if(scopePluginIndex > 0) {
config.resolve.plugins.splice(scopePluginIndex, 1);
}

config.plugins.push(new NodePolyfillPlugin({
excludeAliases: ['console']
}))
return config;
}

config.plugins.push(new NodePolyfillPlugin({
excludeAliases: ['console']
}))

config.plugins.push(
new webpack.ProvidePlugin({
process: 'process/browser',
})
)


return config;
}

0 comments on commit e9d73d6

Please sign in to comment.