Created
November 6, 2019 21:20
-
-
Save surajp/5b25a2aa7b024a785b68f15f5f1c4373 to your computer and use it in GitHub Desktop.
basic webpack config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
module.exports = { | |
mode: "production", | |
entry: "./src/index", | |
output: { | |
// options related to how webpack emits results | |
path: path.resolve(__dirname, "dist"), // string | |
// the target directory for all output files | |
// must be an absolute path (use the Node.js path module) | |
filename: "bundle.js", // string | |
// the filename template for entry chunks | |
publicPath: "/assets/", // string | |
// the url to the output directory resolved relative to the HTML page | |
library: "MyLibrary", // string, | |
// the name of the exported library | |
libraryTarget: "umd", // universal module definition | |
// the type of the exported library | |
/* Advanced output configuration (click to show) */ | |
/* Expert output configuration (on own risk) */ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment