-
-
Notifications
You must be signed in to change notification settings - Fork 155
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug description
I'm trying to use this package with the Symfony Asset Mapper, which leverages ESM loading to avoid Node/npm as a requirement. This seems to work well with your package, except for the fact that the CSS dist file is not mapped in the package.json, so ESM does not see that.
Expected behavior
CSS is included in the package, so that CDNs like jsDelivr will consider it and add to the needed files.
Steps to reproduce
- Go to jsDelivr
- Click on ESM mode button
- See that only the JS file is imported:
<script type="module">
import tomSelect from 'https://cdn.jsdelivr.net/npm/tom-select@2.3.1/+esm'
</script>Additional context
The Symfony docs refer to the package.json configuration file as a way to fix this; we probably need to add keys like sass or style to the root of the package.json, like Bootstrap does: https://github.com/twbs/bootstrap/blob/e3e00b5002139adb0d5dadd6002e15b7b6cd371f/package.json#L40
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working