From 8c3ab711e1b93d996f12f14169748a1354c7ca65 Mon Sep 17 00:00:00 2001 From: stdavis Date: Tue, 14 Feb 2023 16:39:55 -0700 Subject: [PATCH] fix: fix clsx in dojo build --- _src/app/packages.js | 4 ++-- build_deps.sh | 1 + profiles/build.profile.js | 14 ++++---------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/_src/app/packages.js b/_src/app/packages.js index 69503c31..79c1abf0 100644 --- a/_src/app/packages.js +++ b/_src/app/packages.js @@ -102,8 +102,8 @@ require({ }, { name: 'clsx', - location: '../node_modules/clsx/dist', - main: 'clsx.min', + location: './clsx', + main: 'index', }, { name: 'uuid', diff --git a/build_deps.sh b/build_deps.sh index 2aaa9a23..3166ac27 100755 --- a/build_deps.sh +++ b/build_deps.sh @@ -8,6 +8,7 @@ export NODE_ENV=production echo 'starting babel' node node_modules/@babel/cli/bin/babel.js --out-dir src/react-toastify node_modules/react-toastify/dist --config-file ./.babelrc +node node_modules/@babel/cli/bin/babel.js --out-file src/clsx/index.js node_modules/clsx/dist/clsx.m.js --config-file ./.babelrc echo 'using esbuild to bundle service worker' ./node_modules/.bin/esbuild _src/ServiceWorker.js --bundle --outfile=src/ServiceWorker.js --define:process.env.REACT_APP_FIREBASE_CONFIG=$(npx dotenv -p REACT_APP_FIREBASE_CONFIG) diff --git a/profiles/build.profile.js b/profiles/build.profile.js index b8faf5ae..27e43793 100644 --- a/profiles/build.profile.js +++ b/profiles/build.profile.js @@ -27,12 +27,6 @@ var profile = { trees: [ ['.', '.', /(\/\.)|(~$)|(widgets|resources)/] ] - }, { - name: 'clsx', - location: '../node_modules/clsx/dist', - trees: [ - ['.', '.', /(\/\.)|(~$)|(m\.js)/] - ] }, { name: 'downshift', location: '../node_modules/downshift/dist', @@ -115,10 +109,10 @@ var profile = { ['.', '.', /(\/\.)|(.stories.js)/] ] }, { - name: 'react-toastify', - trees: [ - ['.', '.', /(\/\.)|(index\.esm)/] - ] + name: 'react-toastify', + trees: [ + ['.', '.', /(\/\.)|(index\.esm)/] + ] }, { name: 'toaster', location: './toaster',