vue-fontawesome
vue-fontawesome copied to clipboard
Use without build
Is your feature request related to a problem? Please describe. I want to be able to use this whole without using a build system, from source.
Describe the solution you'd like Able to import a single file as es6-module, that pulls-in all needed sub-files. WITHOUT the need to use a build system to create the final file that will be imported. Eg.: Pull the repo, and include a sinle file from the source gotten.
Additional context
I see you guys using nodejs/rollup/etc but i want to use the raw sources directly as ES6-module(s).
For example which file is used by import { library } from '@fortawesome/fontawesome-svg-core'
from the repo?
@TriMoon I'm not quite sure what you're going for. We have an ES module here. 🤷♂️
@TriMoon I'm not quite sure what you're going for. We have an ES module here. man_shrugging
Unfortunatly thats not a real ES module as it requires node-modules, see https://github.com/FortAwesome/vue-fontawesome/blob/master/index.es.js#L1 (It imports from a @namespace...)
To have it working in the browser, I had to replace
import { library } from '@fortawesome/fontawesome-svg-core'
with
import { library } from 'path/to/fontawesome-svg-core/index.es.js'
Ah, we don't have a browser ES module yet. This lib is not compatible with that yet.
Many projects do not rely on nodejs and need a browser ES module. Will this lib be compatible with that in the future?
We have an AMD/UMD bundle here:
https://github.com/FortAwesome/vue-fontawesome/blob/master/index.js
But we don't have an ES module that works in the browser because this project depends on other projects and I don't know how to sort that out efficiently.
Maybe you all can help. This project uses Rollup.js (config right here). How does this need to be re-written so that it works for everyone, regardless of how they are hosting this library or using a CDN?
As I can see on Rollup.js Quick start docs, the output format for browsers is iife
. Maybe it is sufficient to add this in your config?
@d9beuD this doesn't produce a ES module. I'll keep reading and researching to see if there is a way to make this happen.
Vue.js has a browser ES module, take a look at this line in their package.json file. Hope this will help.
Any progress on this topic yet? 3 months have passed...
PRs are welcome!