Parcourir la source

add library name

Andrey Titovskiy il y a 3 ans
Parent
commit
8284c1c0d9
3 fichiers modifiés avec 17 ajouts et 8 suppressions
  1. 13 2
      build/index.js
  2. 1 1
      build/index.js.map
  3. 3 5
      webpack.config.js

+ 13 - 2
build/index.js

@@ -1,4 +1,14 @@
-/******/ (function(modules) { // webpackBootstrap
+(function webpackUniversalModuleDefinition(root, factory) {
+	if(typeof exports === 'object' && typeof module === 'object')
+		module.exports = factory();
+	else if(typeof define === 'function' && define.amd)
+		define([], factory);
+	else if(typeof exports === 'object')
+		exports["Branding"] = factory();
+	else
+		root["Branding"] = factory();
+})(typeof self !== 'undefined' ? self : this, function() {
+return /******/ (function(modules) { // webpackBootstrap
 /******/ 	// The module cache
 /******/ 	var installedModules = {};
 /******/
@@ -14861,5 +14871,6 @@ class Vashden extends __WEBPACK_IMPORTED_MODULE_1_react__["PureComponent"] {
 // removed by extract-text-webpack-plugin
 
 /***/ })
-/******/ ]);
+/******/ ])["default"];
+});
 //# sourceMappingURL=index.js.map

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
build/index.js.map


+ 3 - 5
webpack.config.js

@@ -9,8 +9,11 @@ const outputDirectory = "build";
 module.exports = {
 	entry: './src/index.js',
 	output: {
+		library: 'Branding',
 		path: path.resolve(__dirname, outputDirectory),
 		filename: 'index.js',
+		libraryTarget: 'umd',
+		libraryExport: 'default'
 	},
 	devtool: 'source-map',
 	module: {
@@ -93,10 +96,5 @@ module.exports = {
 		new ExtractTextPlugin({
 			filename: 'assets/css/[name].[contenthash:8].css'
 		}),
-		// new HtmlWebpackPlugin({
-		// 	template: './public/index.html',
-		// 	title: 'Production',
-		// 	favicon: "./public/favicons/favicon.ico"
-		// })
 	]
 };