vicious-gold
vicious-gold•2y ago

Default access-control-casbin react sample boiler template gives error

😩
No description
2 Replies
xenophobic-harlequin
xenophobic-harlequin•2y ago
@vinith7662 Hi, i will debug and return you as soon as possible @vinith7662 hi again, thanks for the issue ! can you add this to config-overrides.js ?
config.module.rules.push({
test: /\.m?js/,
resolve: {
fullySpecified: false,
},
})
config.module.rules.push({
test: /\.m?js/,
resolve: {
fullySpecified: false,
},
})
full config-ovverrides.js
const webpack = require('webpack')

module.exports = function override(config) {
config.resolve.fallback = Object.assign(config.resolve.fallback || {}, {
...config.resolve.fallback,
fs: false,
buffer: require.resolve('buffer'),
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
assert: require.resolve('assert'),
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
os: require.resolve('os-browserify'),
url: require.resolve('url'),
})
config.plugins = (config.plugins || []).concat([
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
}),
])

config.module.rules.push({
test: /\.m?js/,
resolve: {
fullySpecified: false,
},
})
return config
}
const webpack = require('webpack')

module.exports = function override(config) {
config.resolve.fallback = Object.assign(config.resolve.fallback || {}, {
...config.resolve.fallback,
fs: false,
buffer: require.resolve('buffer'),
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify'),
assert: require.resolve('assert'),
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
os: require.resolve('os-browserify'),
url: require.resolve('url'),
})
config.plugins = (config.plugins || []).concat([
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
}),
])

config.module.rules.push({
test: /\.m?js/,
resolve: {
fullySpecified: false,
},
})
return config
}
we will fix our repo. thanks again !
vicious-gold
vicious-goldOP•2y ago
yeah now its working fine thank you

Did you find this page helpful?