I'm writing a lib with webpack with these settings:  output: {     path: path.join('build'),     filename: 'my_lib.js',     library: 'MyLib',     libraryTarget: 'umd'   },   MyLib:  export default function() {   co...
I want to create a frontend library. Therefore I want to use webpack. I especially like the css and image loader. However I can only require non-JS files if I am using webpack. Because I am building a library, I cannot garanty that the user of my lib...
I'm writing a library using handlebars templates and I want to use Webpack to bundle it. I'm using handlebars-loader so that I can require and precompile the templates.  However I don't want handlebars (nor handlebars/runtime) to be inclu...
I have a UMD bundle of my package called utils, it only has one method called sum like this:  <script src="path/to/my/utils-umd.js"></script> <script> console.log(utils.sum([1,2,3])); // => 6 </script>   Now, I want...
I was wondering  I am used to work with Webpack and bundle my own libraries to UMD and ESM.  But now I see that some of the libraries I am using, do not even create ESM bundles. Even though, I am able to import them using es6 syntax!.  If it is the c...
I'm trying to use Babel to transpile ECMA6 import of jQuery to a UMD wrapper.  My ECMA6 sources look as follows:   import {jQuery as $} from jquery;  <payload>   and Babel transpiles this to:  (function (global, factory) {   if (typeof defi...
I am writing an NPM module that exports a single file. I have set the --module flag to umd. I would like to expose the default export of this file as a global variable.  Is it possible to export a UMD module as a global variable in Typescript 1.8?...
I use the browserify standalone option in the following gulp tasks to generate an UMD module:  gulp.task("bundle-source", function () {   var b = browserify({     standalone : 'inversify',     entries: __dirname + "/build/source/i...
I wanted to use the React Virtualized Select to show almost around 1 million records in a select dropdown. I have already created the project based on flask and angularjs. I wasn't able to find any resources for such a dropdown through angularjs,...
I'm looking to open source an angular directive on npm and I'm trying to come up with the most universal pattern for doing so. How's this? I have 3 questions:  !function(name, make) {   make = make()    // 1. Is this line needed?   var an...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.