feat: support standalone version #376
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request updates the build process and documentation to support both a React-based and a standalone version of the
traitify-widgetspackage. It introduces new build outputs, updates the package exports, and clarifies usage in the README.Build system and packaging improvements:
exportsfield inpackage.jsonto expose both the main build (./build/traitify.js) and a new standalone build (./build/traitify-standalone.js) for modular consumption.package.jsonto generate both the standard and standalone builds using separate commands and output names.webpack.config.jsto accept anoutputenvironment variable, allowing dynamic naming of the output file (e.g.,traitify.jsortraitify-standalone.js). [1] [2]Documentation updates:
README.mdto clarify usage for both the React-based and standalone versions, including import instructions for each.