miss-plete
miss-plete copied to clipboard
make miss-plete browserify compatible
added babel and browserify configuration so that this module can be used by browserify
MissPlete is now published to npm, transpiled to ES5 and UMD. Does this make it Browserify compatible too? (See https://github.com/xavi/miss-plete#installation)
no! why are you loading css in the bundle ?
right now its unusable without setting up full dev env with babel webpack etc etc
By loading the CSS in the bundle, the CSS doesn't have to be separately included in the page.
No, there's no need to set up Babel or webpack to use MissPlete, because the bundle is in ES5 and webpack included the code that automatically adds the CSS to the page when the bundle is loaded. For example, do npm install miss-plete --save
and now it can be included and used directly in your page with something like
<script src="node_modules/miss-plete/dist/bundle.js"></script>
<script>
new MissPlete.default({
input: document.querySelector('input[name="city"]'),
options: [["Barcelona", "BCN"], ["San Francisco", "SF"]]
});
</script>
@xavi It's not working for me with Browserify, the CSS fails to load:
Cannot find module '!!./../node_modules/css-loader/index.js!./miss-plete.css' from '/Users/user/Sites/Homestead/astral/node_modules/miss-plete/dist'