mirror of
				https://github.com/KevinMidboe/vue-chartjs.git
				synced 2025-10-29 18:00:20 +00:00 
			
		
		
		
	✨ Add browser build
This commit is contained in:
		| @@ -12,7 +12,8 @@ module.exports = { | ||||
|   output: { | ||||
|     filename: './dist/[name].js', | ||||
|     library: 'VueChartJs', | ||||
|     libraryTarget: 'umd' | ||||
|     libraryTarget: 'umd', | ||||
|     umdNamedDefine: true | ||||
|   }, | ||||
|   module: { | ||||
|     preLoaders: [ | ||||
|   | ||||
							
								
								
									
										18
									
								
								build/webpack.release.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								build/webpack.release.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| var config = require('./webpack.release.js') | ||||
| var webpack = require('webpack') | ||||
|  | ||||
| config.output.filename = config.output.filename.replace(/\.js$/, '.min.js') | ||||
|  | ||||
| delete config.devtool | ||||
|  | ||||
| config.plugins = [ | ||||
|   new webpack.optimize.UglifyJsPlugin({ | ||||
|     sourceMap: false, | ||||
|     compress: { | ||||
|       warnings: false | ||||
|     } | ||||
|   }), | ||||
|   new webpack.optimize.OccurenceOrderPlugin() | ||||
| ] | ||||
|  | ||||
| module.exports = config | ||||
| @@ -37,7 +37,8 @@ | ||||
|     "Charts" | ||||
|   ], | ||||
|   "main": "dist/vue-chartjs.js", | ||||
|   "unpkg": "dist/vue-chartjs.js", | ||||
|   "unpkg": "dist/vue-chartjs.min.js", | ||||
|   "browser": "dist/vue-chartjs.min.js", | ||||
|   "module": "es/index.js", | ||||
|   "jsnext:main": "es/index.js", | ||||
|   "files": [ | ||||
| @@ -53,7 +54,7 @@ | ||||
|     "e2e": "node test/e2e/runner.js", | ||||
|     "test": "npm run unit", | ||||
|     "lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs", | ||||
|     "release": "webpack --progress --hide-modules --config  ./build/webpack.release.js", | ||||
|     "release": "webpack --progress --hide-modules --config  ./build/webpack.release.js && NODE_ENV=production webpack --progress --hide-modules --config  ./build/webpack.release.min.js", | ||||
|     "prepublish": "yarn run lint && yarn run test && yarn run build" | ||||
|   }, | ||||
|   "dependencies": { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user