@@ -439,8 +439,6 @@ module.exports = {
439
439
440
440
The above webpack 5 example can be used in the ` craco.config.js ` file at the root level in this case.
441
441
442
- ** Note:** currently still facing some challenges building with CRA and CRACO for hardware wallets
443
-
444
442
### SvelteKit
445
443
446
444
Add the following dev dependencies:
@@ -462,20 +460,28 @@ const config = {
462
460
preprocess: preprocess (),
463
461
kit: {
464
462
adapter: adapter (),
465
- target: ' #svelte' ,
466
463
vite: {
467
464
plugins: [
468
465
development &&
469
466
nodePolyfills ({
470
467
include: [
471
468
' node_modules/**/*.js' ,
472
469
new RegExp (' node_modules/.vite/.*js' )
473
- ]
470
+ ],
471
+ http: true ,
472
+ crypto: true
474
473
})
475
474
],
475
+ resolve: {
476
+ alias: {
477
+ crypto: ' crypto-browserify' ,
478
+ stream: ' stream-browserify' ,
479
+ assert: ' assert'
480
+ }
481
+ },
476
482
build: {
477
483
rollupOptions: {
478
- plugins: [nodePolyfills ()]
484
+ plugins: [nodePolyfills ({ crypto : true , http : true } )]
479
485
},
480
486
commonjsOptions: {
481
487
transformMixedEsModules: true
@@ -507,12 +513,24 @@ export default {
507
513
plugins: [
508
514
development &&
509
515
nodePolyfills ({
510
- include: [' node_modules/**/*.js' , new RegExp (' node_modules/.vite/.*js' )]
516
+ include: [
517
+ ' node_modules/**/*.js' ,
518
+ new RegExp (' node_modules/.vite/.*js' )
519
+ ],
520
+ http: true ,
521
+ crypto: true
511
522
})
512
523
],
524
+ resolve: {
525
+ alias: {
526
+ crypto: ' crypto-browserify' ,
527
+ stream: ' stream-browserify' ,
528
+ assert: ' assert'
529
+ }
530
+ },
513
531
build: {
514
532
rollupOptions: {
515
- plugins: [nodePolyfills ()]
533
+ plugins: [nodePolyfills ({ crypto : true , http : true } )]
516
534
},
517
535
commonjsOptions: {
518
536
transformMixedEsModules: true
0 commit comments