File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,11 +12,28 @@ async function build(input, output) {
1212 output : {
1313 path : output ,
1414 } ,
15- externals : {
16- 'mapbox-gl' : '{}' ,
17- 'react-mapbox-wrapper' : '{}' ,
18- '@drawbotics/use-screen-size' : '{}' ,
15+ resolve : {
16+ mainFields : [ 'main' , 'module' ] ,
1917 } ,
18+ module : {
19+ rules : [
20+ { test : / \. m j s $ / , include : / n o d e _ m o d u l e s / , type : 'javascript/auto' } ,
21+ ] ,
22+ } ,
23+ externals : [
24+ { 'mapbox-gl' : '{}' } ,
25+ { 'react-map-gl' : '{}' } ,
26+ { 'framer-motion' : '{}' } ,
27+ { 'animejs' : '{}' } ,
28+ { '@drawbotics/use-screen-size' : '{}' } ,
29+ function ( context , request , callback ) {
30+ // Ignore CSS imports and problematic modules that don't contribute emotion styles
31+ if ( / \. c s s $ / . test ( request ) || / ^ m a p b o x - g l / . test ( request ) || / ^ g e t - u s e r - l o c a l e / . test ( request ) ) {
32+ return callback ( null , '{}' ) ;
33+ }
34+ callback ( ) ;
35+ } ,
36+ ] ,
2037 } ) ;
2138 compiler . outputFileSystem = memFs ;
2239
Original file line number Diff line number Diff line change 99 "scripts" : {
1010 "clean" : " rimraf dist" ,
1111 "sync" : " node scripts/sync.js" ,
12- "watch:lib" : " NODE_ENV=development webpack --config webpack.config.js --watch" ,
12+ "watch:lib" : " NODE_OPTIONS=--openssl-legacy-provider NODE_ENV=development webpack --config webpack.config.js --watch" ,
1313 "watch:react" : " node ./scripts/watch-react.js" ,
14- "watch" : " NODE_ENV=development webpack --config webpack.config.js --watch" ,
15- "build:lib" : " NODE_ENV=production webpack --config webpack.config.js" ,
16- "extract-css" : " extract-emotion ./src/styles/react-components.js --output ./src/styles/ --prefix Drylus --filename react-styles.css" ,
14+ "watch" : " NODE_OPTIONS=--openssl-legacy-provider NODE_ENV=development webpack --config webpack.config.js --watch" ,
15+ "build:lib" : " NODE_OPTIONS=--openssl-legacy-provider NODE_ENV=production webpack --config webpack.config.js" ,
16+ "extract-css" : " NODE_OPTIONS=--openssl-legacy-provider extract-emotion ./src/styles/react-components.js --output ./src/styles/ --prefix Drylus --filename react-styles.css" ,
1717 "build" : " npm run clean && cd ../react-drylus && npm run build && cd ../vanilla-drylus && npm run extract-css && npm run build:lib" ,
1818 "build:dev" : " npm run build && NODE_ENV=development npm run sync" ,
1919 "prepublishOnly" : " npm run build && NODE_ENV=production npm run sync"
You can’t perform that action at this time.
0 commit comments