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 installed reactjs and react-dom like this with package.json  "dependencies": {    "bootstrap": "^v4.1.1",    "popper.js": "^1.14.3",    "react": "^v16.4.1",    "react-dom": "^16.4....
I have found a few StackOverflow questions related to this but none that match nor fix my problem.  I am writing a library in ES6 that is intended to be used in the browser and on the server. I have found a few HTTP request libraries that can be use...
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'm creating my first AngularJS module intended for open source distribution. I'd like to package it in a way that's easy for others to consume.  The UMD project provides a pattern for exporting JavaScript modules that are compatible with...
I tried this the last two days and I can't get it to work like expected: I want to build my own JavaScript library and register it under an already existing namespace ("OCA" - in this particular case). And as you might understand, I don&#...
I read this post and i want use D3.js (v4+) using only import statement like this:  import { selection } from '../node modules/d3/build/d3.js';   But, because code output is UMD (or read this) and can't import because some globals is no d...
Library  I'm creating a React.js library and trying to package it as a UMD for distribution. In the library, the webpack.config.js file is as follows:  module.exports = {   entry: [     __dirname+'/modules/index.js'   ],   output: {     p...
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...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.