Skip to content

Instantly share code, notes, and snippets.

@ultrox
Created October 27, 2018 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ultrox/518a4b0dac3d404343c1ad07402e95a6 to your computer and use it in GitHub Desktop.
Save ultrox/518a4b0dac3d404343c1ad07402e95a6 to your computer and use it in GitHub Desktop.
From how to build open source lib - Kent C. Dodds
//https://egghead.io/lessons/javascript-add-a-browser-build-to-an-npm-module
import { join } from "path";
export default {
entry: "./src/index.js",
output: {
path: join(__dirname, "dist"),
libraryTarget: "umd",
library: "starWarsNames"
},
devtool: "source-map",
module: {
rules: [{ test: /\.js$/, use: "babel-loader" }]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment