mirror of
				https://github.com/KevinMidboe/vue-js-modal.git
				synced 2025-10-29 18:00:20 +00:00 
			
		
		
		
	Simplified webpack config and added missing dev dep (#21)
This commit is contained in:
		| @@ -17,7 +17,6 @@ | ||||
|     "url": "https://github.com/euvl/vue-js-modal/issues" | ||||
|   }, | ||||
|   "scripts": { | ||||
|     "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot", | ||||
|     "build": "cross-env NODE_ENV=production webpack --progress --hide-modules" | ||||
|   }, | ||||
|   "license": "MIT", | ||||
| @@ -31,6 +30,7 @@ | ||||
|     "file-loader": "^0.9.0", | ||||
|     "node-sass": "^4.5.0", | ||||
|     "sass-loader": "^5.0.1", | ||||
|     "vue": "^2.2.6", | ||||
|     "vue-hot-reload-api": "^2.0.8", | ||||
|     "vue-loader": "^10.0.0", | ||||
|     "vue-style-loader": "^2.0.0", | ||||
|   | ||||
| @@ -6,7 +6,9 @@ module.exports = { | ||||
|   output: { | ||||
|     path: path.resolve(__dirname, './dist'), | ||||
|     publicPath: '/dist/', | ||||
|     filename: 'index.js' | ||||
|     filename: 'index.js', | ||||
|     library:'VueJsModal', | ||||
|     libraryTarget: 'umd' | ||||
|   }, | ||||
|   module: { | ||||
|     rules: [ | ||||
| @@ -46,31 +48,15 @@ module.exports = { | ||||
|   performance: { | ||||
|     hints: false | ||||
|   }, | ||||
|   devtool: '#eval-source-map' | ||||
| } | ||||
|  | ||||
| if (process.env.NODE_ENV === 'production') { | ||||
|   module.exports.output = { | ||||
|     path:'./dist', | ||||
|     filename:'index.js', | ||||
|     library:'VueJsModal', | ||||
|     libraryTarget: 'umd' | ||||
|   } | ||||
|  | ||||
|   module.exports.devtool = '#source-map' | ||||
|   module.exports.plugins = (module.exports.plugins || []).concat([ | ||||
|   devtool: '#source-map', | ||||
|   plugins: [ | ||||
|     new webpack.DefinePlugin({ | ||||
|       'process.env': { | ||||
|         NODE_ENV: '"production"' | ||||
|       } | ||||
|     }), | ||||
|     /*new webpack.optimize.UglifyJsPlugin({ | ||||
|       sourceMap: false, | ||||
|       extractComments: true, | ||||
|       compress: false | ||||
|     }),*/ | ||||
|     new webpack.LoaderOptionsPlugin({ | ||||
|       minimize: true | ||||
|     }) | ||||
|   ]) | ||||
|   ] | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user