├── .babelrc ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── README.md ├── dist └── vue-split-pane.min.js ├── docs ├── index.css └── index.html ├── package.json ├── src ├── index.js └── split-pane │ ├── index.vue │ ├── pane.vue │ └── resizer.vue └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "presets": ["es2015", "stage-2"], 4 | "plugins": ["transform-runtime"] 5 | } 6 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | config/*.js 3 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: 'babel-eslint', 4 | parserOptions: { 5 | sourceType: 'module' 6 | }, 7 | env: { 8 | browser: true, 9 | node: true 10 | }, 11 | extends: 'eslint:recommended', 12 | // required to lint *.vue files 13 | plugins: [ 14 | 'html' 15 | ], 16 | // check if imports actually resolve 17 | 'settings': { 18 | 'import/resolver': { 19 | 'webpack': { 20 | 'config': 'build/webpack.base.conf.js' 21 | } 22 | } 23 | }, 24 | // add your custom rules here 25 | 'rules': { 26 | // don't require .vue extension when importing 27 | // 'import/extensions': ['error', 'always', { 28 | // 'js': 'never', 29 | // 'vue': 'never' 30 | // }], 31 | // allow debugger during development 32 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, 33 | /* 34 | * Possible Errors 35 | */ 36 | 37 | // disallow unnecessary parentheses 38 | 'no-extra-parens': ['error', 'all', {'nestedBinaryExpressions': false}], 39 | 40 | // disallow negating the left operand of relational operators 41 | 'no-unsafe-negation': 'error', 42 | 43 | // enforce valid JSDoc comments 44 | 'valid-jsdoc': 'off', 45 | 46 | /* 47 | * Best Practices 48 | */ 49 | 50 | // enforce return statements in callbacks of array methods 51 | 'array-callback-return': 'error', 52 | 53 | // enforce consistent brace style for all control statements 54 | curly: ['error', 'multi-line'], 55 | 56 | // enforce consistent newlines before and after dots 57 | 'dot-location': ['error', 'property'], 58 | 59 | // enforce dot notation whenever possible 60 | 'dot-notation': 'error', 61 | 62 | // require the use of === and !== 63 | 'eqeqeq': ['error', 'smart'], 64 | 65 | // disallow the use of arguments.caller or arguments.callee 66 | 'no-caller': 'error', 67 | 68 | // disallow empty functions 69 | 'no-empty-function': 'error', 70 | 71 | // disallow unnecessary calls to .bind() 72 | 'no-extra-bind': 'error', 73 | 74 | // disallow unnecessary labels 75 | 'no-extra-label': 'error', 76 | 77 | // disallow leading or trailing decimal points in numeric literals 78 | 'no-floating-decimal': 'error', 79 | 80 | // disallow assignments to native objects or read-only global variables 81 | 'no-global-assign': 'error', 82 | 83 | // disallow the use of eval()-like methods 84 | 'no-implied-eval': 'error', 85 | 86 | // disallow the use of the __iterator__ property 87 | 'no-iterator': 'error', 88 | 89 | // disallow unnecessary nested blocks 90 | 'no-lone-blocks': 'error', 91 | 92 | // disallow multiple spaces 93 | 'no-multi-spaces': 'error', 94 | 95 | // disallow new operators with the String, Number, and Boolean objects 96 | 'no-new-wrappers': 'error', 97 | 98 | // disallow octal escape sequences in string literals 99 | 'no-octal-escape': 'error', 100 | 101 | // disallow the use of the __proto__ property 102 | 'no-proto': 'error', 103 | 104 | // disallow comparisons where both sides are exactly the same 105 | 'no-self-compare': 'error', 106 | 107 | // disallow throwing literals as exceptions 108 | 'no-throw-literal': 'error', 109 | 110 | // disallow unused expressions 111 | 'no-unused-expressions': 'error', 112 | 113 | // disallow unnecessary calls to .call() and .apply() 114 | 'no-useless-call': 'error', 115 | 116 | // disallow unnecessary concatenation of literals or template literals 117 | 'no-useless-concat': 'error', 118 | 119 | // disallow unnecessary escape characters 120 | 'no-useless-escape': 'error', 121 | 122 | // disallow void operators 123 | 'no-void': 'error', 124 | 125 | // require parentheses around immediate function invocations 126 | 'wrap-iife': 'error', 127 | 128 | // require or disallow “Yoda” conditions 129 | yoda: 'error', 130 | 131 | /* 132 | * Variables 133 | */ 134 | 135 | // disallow labels that share a name with a variable 136 | 'no-label-var': 'error', 137 | 138 | // disallow initializing variables to undefined 139 | 'no-undef-init': 'error', 140 | 'no-undef': 'off', 141 | // disallow the use of variables before they are defined 142 | 'no-use-before-define': 'error', 143 | 144 | /* 145 | * Node.js and CommonJS 146 | */ 147 | 148 | // disallow new operators with calls to require 149 | 'no-new-require': 'error', 150 | 151 | /* 152 | * Stylistic Issues 153 | */ 154 | 155 | // enforce consistent spacing inside array brackets 156 | 'array-bracket-spacing': 'error', 157 | 158 | // enforce consistent spacing inside single-line blocks 159 | 'block-spacing': 'error', 160 | 161 | // enforce consistent brace style for blocks 162 | 'brace-style': ['error', '1tbs', {'allowSingleLine': true}], 163 | 164 | // require or disallow trailing commas 165 | 'comma-dangle': 'error', 166 | 167 | // enforce consistent spacing before and after commas 168 | 'comma-spacing': 'error', 169 | 170 | // enforce consistent comma style 171 | 'comma-style': 'error', 172 | 173 | // enforce consistent spacing inside computed property brackets 174 | 'computed-property-spacing': 'error', 175 | 176 | // require or disallow spacing between function identifiers and their invocations 177 | 'func-call-spacing': 'error', 178 | 179 | // enforce consistent indentation 180 | indent: ['error', 2, {SwitchCase: 1}], 181 | 182 | // enforce the consistent use of either double or single quotes in JSX attributes 183 | 'jsx-quotes': 'error', 184 | 185 | // enforce consistent spacing between keys and values in object literal properties 186 | 'key-spacing': 'error', 187 | 188 | // enforce consistent spacing before and after keywords 189 | 'keyword-spacing': 'error', 190 | 191 | // enforce consistent linebreak style 192 | 'linebreak-style': 'error', 193 | 194 | // require or disallow newlines around directives 195 | 'lines-around-directive': 'error', 196 | 197 | // require constructor names to begin with a capital letter 198 | 'new-cap': 'off', 199 | 200 | // require parentheses when invoking a constructor with no arguments 201 | 'new-parens': 'error', 202 | 203 | // disallow Array constructors 204 | 'no-array-constructor': 'error', 205 | 206 | // disallow Object constructors 207 | 'no-new-object': 'error', 208 | 209 | // disallow trailing whitespace at the end of lines 210 | 'no-trailing-spaces': 'error', 211 | 212 | // disallow ternary operators when simpler alternatives exist 213 | 'no-unneeded-ternary': 'error', 214 | 215 | // disallow whitespace before properties 216 | 'no-whitespace-before-property': 'error', 217 | 218 | // enforce consistent spacing inside braces 219 | 'object-curly-spacing': ['error', 'always'], 220 | 221 | // require or disallow padding within blocks 222 | 'padded-blocks': ['error', 'never'], 223 | 224 | // require quotes around object literal property names 225 | 'quote-props': ['error', 'as-needed'], 226 | 227 | // enforce the consistent use of either backticks, double, or single quotes 228 | quotes: ['error', 'single'], 229 | 230 | // enforce consistent spacing before and after semicolons 231 | 'semi-spacing': 'error', 232 | 233 | // require or disallow semicolons instead of ASI 234 | // semi: ['error', 'never'], 235 | 236 | // enforce consistent spacing before blocks 237 | 'space-before-blocks': 'error', 238 | 239 | 'no-console': 'off', 240 | 241 | // enforce consistent spacing before function definition opening parenthesis 242 | 'space-before-function-paren': ['error', 'never'], 243 | 244 | // enforce consistent spacing inside parentheses 245 | 'space-in-parens': 'error', 246 | 247 | // require spacing around infix operators 248 | 'space-infix-ops': 'error', 249 | 250 | // enforce consistent spacing before or after unary operators 251 | 'space-unary-ops': 'error', 252 | 253 | // enforce consistent spacing after the // or /* in a comment 254 | 'spaced-comment': 'error', 255 | 256 | // require or disallow Unicode byte order mark (BOM) 257 | 'unicode-bom': 'error', 258 | 259 | 260 | /* 261 | * ECMAScript 6 262 | */ 263 | 264 | // require braces around arrow function bodies 265 | 'arrow-body-style': 'error', 266 | 267 | // require parentheses around arrow function arguments 268 | 'arrow-parens': ['error', 'as-needed'], 269 | 270 | // enforce consistent spacing before and after the arrow in arrow functions 271 | 'arrow-spacing': 'error', 272 | 273 | // enforce consistent spacing around * operators in generator functions 274 | 'generator-star-spacing': ['error', 'after'], 275 | 276 | // disallow duplicate module imports 277 | 'no-duplicate-imports': 'error', 278 | 279 | // disallow unnecessary computed property keys in object literals 280 | 'no-useless-computed-key': 'error', 281 | 282 | // disallow unnecessary constructors 283 | 'no-useless-constructor': 'error', 284 | 285 | // disallow renaming import, export, and destructured assignments to the same name 286 | 'no-useless-rename': 'error', 287 | 288 | // require let or const instead of var 289 | 'no-var': 'error', 290 | 291 | // require or disallow method and property shorthand syntax for object literals 292 | 'object-shorthand': 'error', 293 | 294 | // require arrow functions as callbacks 295 | 'prefer-arrow-callback': 'error', 296 | 297 | // require const declarations for variables that are never reassigned after declared 298 | 'prefer-const': 'error', 299 | 300 | // disallow parseInt() in favor of binary, octal, and hexadecimal literals 301 | 'prefer-numeric-literals': 'error', 302 | 303 | // require rest parameters instead of arguments 304 | 'prefer-rest-params': 'error', 305 | 306 | // require spread operators instead of .apply() 307 | 'prefer-spread': 'error', 308 | 309 | // enforce spacing between rest and spread operators and their expressions 310 | 'rest-spread-spacing': 'error', 311 | 312 | // require or disallow spacing around embedded expressions of template strings 313 | 'template-curly-spacing': 'error', 314 | 315 | // require or disallow spacing around the * in yield* expressions 316 | 'yield-star-spacing': 'error' 317 | } 318 | } 319 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | npm-debug.log 4 | yarn-error.log 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue Split Pane 2 | 3 | Split-Pane component built with vue2.0, can be split vertically or horizontally. 4 | 5 | ## [Try the demo](http://panjiachen.github.io/split-pane/demo/index.html) 6 | 7 | ### How to use? 8 | ```bash 9 | npm install vue-splitpane 10 | 11 | #import 12 | import splitPane from 'vue-splitpane' 13 | 14 | # use as global component 15 | Vue.component('split-pane', splitPane); 16 | ``` 17 | 18 | ### Example 19 | 20 | ```html 21 | 22 | 25 | 28 | 29 | ``` 30 | 31 | ```html 32 | //nested 33 | 34 | 37 | 47 | 48 | ``` 49 | 50 | ### Options 51 | | Property | Description | type | default | 52 | | ----------------- | ---------------- | :--------: | :----------: | 53 | | split | the split type |String [horizontal,vertical] |must choose one type | 54 | | min-percent | paneL max-min-percent |Number | 10 | 55 | | max-percent | paneL max-percent |Number | 10 | 56 | 57 | -------------------------------------------------------------------------------- /dist/vue-split-pane.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("SplitPane",[],t):"object"==typeof exports?exports.SplitPane=t():e.SplitPane=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=7)}([function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;tn.parts.length&&(r.parts.length=n.parts.length)}else{for(var o=[],i=0;i=0},required:!0},className:String},computed:{userSelect:function(){return this.active?"none":""},cursor:function(){return this.active?"vertical"===this.split?"col-resize":"row-resize":""}},watch:{defaultPercent:function(e,t){this.percent=e}},data:function(){return{active:!1,hasMoved:!1,height:null,percent:this.defaultPercent,type:"vertical"===this.split?"width":"height",resizeType:"vertical"===this.split?"left":"top"}},methods:{onClick:function(){this.hasMoved||(this.percent=50,this.$emit("resize",this.percent))},onMouseDown:function(){this.active=!0,this.hasMoved=!1},onMouseUp:function(){this.active=!1},onMouseMove:function(e){if(0!==e.buttons&&0!==e.which||(this.active=!1),this.active){var t=0,n=e.currentTarget;if("vertical"===this.split)for(;n;)t+=n.offsetLeft,n=n.offsetParent;else for(;n;)t+=n.offsetTop,n=n.offsetParent;var r="vertical"===this.split?e.pageX:e.pageY,i="vertical"===this.split?e.currentTarget.offsetWidth:e.currentTarget.offsetHeight,s=Math.floor((r-t)/i*1e4)/100;s>this.minPercent&&s<100-this.minPercent&&(this.percent=s),this.$emit("resize",this.percent),this.hasMoved=!0}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"Pane",props:{className:String},data:function(){return{classes:[this.$parent.split,this.className].join(" "),percent:50}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={props:{split:{validator:function(e){return["vertical","horizontal"].indexOf(e)>=0},required:!0},className:String},computed:{classes:function(){return["splitter-pane-resizer",this.split,this.className].join(" ")}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=i.default,"undefined"!=typeof window&&window.Vue&&window.Vue.component("split-pane",i.default)},function(e,t,n){t=e.exports=n(0)(),t.push([e.i,".splitter-pane-resizer[data-v-212fa2a4]{box-sizing:border-box;background:#000;position:absolute;opacity:.2;z-index:1;background-clip:padding-box}.splitter-pane-resizer.horizontal[data-v-212fa2a4]{height:11px;margin:-5px 0;border-top:5px solid hsla(0,0%,100%,0);border-bottom:5px solid hsla(0,0%,100%,0);cursor:row-resize;width:100%}.splitter-pane-resizer.vertical[data-v-212fa2a4]{width:11px;height:100%;margin-left:-5px;border-left:5px solid hsla(0,0%,100%,0);border-right:5px solid hsla(0,0%,100%,0);cursor:col-resize}",""])},function(e,t,n){t=e.exports=n(0)(),t.push([e.i,'.clearfix[data-v-566a42b8]:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.vue-splitter-container[data-v-566a42b8]{height:100%;position:relative}.vue-splitter-container-mask[data-v-566a42b8]{z-index:9999;width:100%;height:100%;position:absolute;top:0;left:0}',""])},function(e,t,n){t=e.exports=n(0)(),t.push([e.i,".splitter-pane.vertical.splitter-paneL[data-v-815c801c]{position:absolute;left:0;height:100%;padding-right:3px}.splitter-pane.vertical.splitter-paneR[data-v-815c801c]{position:absolute;right:0;height:100%;padding-left:3px}.splitter-pane.horizontal.splitter-paneL[data-v-815c801c]{position:absolute;top:0;width:100%}.splitter-pane.horizontal.splitter-paneR[data-v-815c801c]{position:absolute;bottom:0;width:100%;padding-top:3px}",""])},function(e,t,n){n(18);var r=n(1)(n(5),n(15),"data-v-815c801c",null);e.exports=r.exports},function(e,t,n){n(16);var r=n(1)(n(6),n(13),"data-v-212fa2a4",null);e.exports=r.exports},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{class:e.classes})},staticRenderFns:[]}},function(e,t){e.exports={render:function(){var e,t,n,r=this,i=r.$createElement,s=r._self._c||i;return s("div",{staticClass:"vue-splitter-container clearfix",style:{cursor:r.cursor,userSelect:r.userSelect},on:{mouseup:r.onMouseUp,mousemove:r.onMouseMove}},[s("pane",{staticClass:"splitter-pane splitter-paneL",style:(e={},e[r.type]=r.percent+"%",e),attrs:{split:r.split}},[r._t("paneL")],2),r._v(" "),s("resizer",{style:(t={},t[r.resizeType]=r.percent+"%",t),attrs:{className:r.className,split:r.split},nativeOn:{mousedown:function(e){return r.onMouseDown(e)},click:function(e){return r.onClick(e)}}}),r._v(" "),s("pane",{staticClass:"splitter-pane splitter-paneR",style:(n={},n[r.type]=100-r.percent+"%",n),attrs:{split:r.split}},[r._t("paneR")],2),r._v(" "),r.active?s("div",{staticClass:"vue-splitter-container-mask"}):r._e()],1)},staticRenderFns:[]}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{class:e.classes},[e._t("default")],2)},staticRenderFns:[]}},function(e,t,n){var r=n(8);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(2)("a82a4610",r,!0)},function(e,t,n){var r=n(9);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(2)("033d59ad",r,!0)},function(e,t,n){var r=n(10);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(2)("6816c93c",r,!0)},function(e,t){e.exports=function(e,t){for(var n=[],r={},i=0;i 2 | 3 | 4 | 5 | 6 | vue-split-pane 7 | 8 | 9 | 14 | 15 | 16 | 17 | 18 | 26 | 27 |
28 | 29 | 64 | 65 |
66 | 67 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-splitpane", 3 | "description": "vue split-pane component", 4 | "version": "1.0.6", 5 | "repository": "https://github.com/PanJiaChen/vue-split-pane", 6 | "author": "Pan ", 7 | "main": "dist/vue-split-pane.min.js", 8 | "scripts": { 9 | "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot --content-base='./demo/'", 10 | "watch": "cross-env NODE_ENV=production webpack --progress --watch", 11 | "build": "cross-env NODE_ENV=production webpack --progress --hide-modules" 12 | }, 13 | "license": "MIT", 14 | "homepage": "file:///Users/jiachenpan/www/Github/PanJiaChen.github.io/split-pane/demo/index.html", 15 | "devDependencies": { 16 | "babel-core": "^6.0.0", 17 | "babel-loader": "^6.0.0", 18 | "babel-plugin-transform-runtime": "^6.15.0", 19 | "babel-preset-es2015": "^6.14.0", 20 | "babel-preset-stage-2": "^6.13.0", 21 | "babel-runtime": "^6.11.6", 22 | "cross-env": "^3.0.0", 23 | "css-loader": "^0.25.0", 24 | "file-loader": "^0.9.0", 25 | "vue-loader": "^11.1.4", 26 | "vue-template-compiler": "^2.2.1", 27 | "webpack": "^2.2.0", 28 | "webpack-dev-server": "^2.2.0", 29 | "babel-eslint": "7.1.1", 30 | "eslint": "3.14.1", 31 | "eslint-friendly-formatter": "2.0.7", 32 | "eslint-loader": "1.6.1", 33 | "eslint-plugin-html": "2.0.0", 34 | "eslint-config-airbnb-base": "11.0.1", 35 | "eslint-import-resolver-webpack": "0.8.1", 36 | "eslint-plugin-import": "2.2.0" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import Splitpane from './split-pane/index.vue' 2 | 3 | export default Splitpane 4 | 5 | if (typeof window !== 'undefined' && window.Vue) { 6 | window.Vue.component('split-pane', Splitpane) 7 | } 8 | -------------------------------------------------------------------------------- /src/split-pane/index.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 113 | 114 | 138 | -------------------------------------------------------------------------------- /src/split-pane/pane.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 22 | 23 | 51 | -------------------------------------------------------------------------------- /src/split-pane/resizer.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 24 | 25 | 57 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const webpack = require('webpack') 3 | function resolve(dir) { 4 | return path.join(__dirname, '..', dir) 5 | } 6 | module.exports = { 7 | entry: './src/index.js', 8 | output: { 9 | path: path.resolve(__dirname, './dist'), 10 | publicPath: '/dist/', 11 | filename: 'vue-split-pane.min.js', 12 | library: 'SplitPane', 13 | libraryTarget: 'umd', 14 | umdNamedDefine: true 15 | }, 16 | module: { 17 | rules: [ 18 | { 19 | test: /\.(js|vue)$/, 20 | loader: 'eslint-loader', 21 | enforce: 'pre', 22 | include: [resolve('src'), resolve('test')], 23 | options: { 24 | formatter: require('eslint-friendly-formatter') 25 | } 26 | }, 27 | { 28 | test: /\.vue$/, 29 | loader: 'vue-loader' 30 | }, 31 | { 32 | test: /\.js$/, 33 | loader: 'babel-loader', 34 | exclude: /node_modules/ 35 | }, 36 | { 37 | test: /\.(png|jpg|gif|svg)$/, 38 | loader: 'file-loader', 39 | options: { 40 | name: '[name].[ext]?[hash]' 41 | } 42 | } 43 | ] 44 | }, 45 | resolve: { 46 | alias: { 47 | vue$: 'vue/dist/vue.esm.js' 48 | } 49 | }, 50 | externals: { 51 | vue: { 52 | root: 'Vue', 53 | commonjs: 'vue', 54 | commonjs2: 'vue', 55 | amd: 'vue' 56 | } 57 | }, 58 | devServer: { 59 | historyApiFallback: true, 60 | noInfo: true 61 | }, 62 | performance: { 63 | hints: false 64 | }, 65 | devtool: '#source-map' 66 | } 67 | 68 | if (process.env.NODE_ENV === 'production') { 69 | module.exports.devtool = '#source-map' 70 | // http://vue-loader.vuejs.org/en/workflow/production.html 71 | module.exports.plugins = (module.exports.plugins || []).concat([ 72 | new webpack.DefinePlugin({ 73 | 'process.env': { 74 | NODE_ENV: '"production"' 75 | } 76 | }), 77 | new webpack.optimize.UglifyJsPlugin({ 78 | sourceMap: false, 79 | compress: { 80 | warnings: false 81 | } 82 | }), 83 | new webpack.LoaderOptionsPlugin({ 84 | minimize: true 85 | }) 86 | ]) 87 | } 88 | --------------------------------------------------------------------------------