From 8048fa3d8497ce7d9a622befd4a68045ea111c0b Mon Sep 17 00:00:00 2001 From: weryques Date: Tue, 27 Mar 2018 15:58:52 -0300 Subject: [PATCH] Fix THE BUG --- package.json | 1 + src/admin/pages/singles/collection-page.vue | 2 -- .../field-types/tainacan-form-item.vue | 4 +++- webpack.config.js | 24 +++++++++---------- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index a9fb94c31..89fe47842 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "postcss-loader": "^2.1.0", "sass-resources-loader": "^1.3.2", "style-loader": "^0.20.3", + "uglifyjs-webpack-plugin": "^1.2.4", "vue-custom-element": "^2.1.0", "vue-loader": "^14.2.2", "vue-template-compiler": "^2.5.16", diff --git a/src/admin/pages/singles/collection-page.vue b/src/admin/pages/singles/collection-page.vue index e9df795dd..b9aa514fb 100644 --- a/src/admin/pages/singles/collection-page.vue +++ b/src/admin/pages/singles/collection-page.vue @@ -17,8 +17,6 @@ export default { collectionId: Number } }, - methods: { - }, components: { SecondaryMenu }, diff --git a/src/classes/field-types/tainacan-form-item.vue b/src/classes/field-types/tainacan-form-item.vue index a6559debe..d155bbcaf 100644 --- a/src/classes/field-types/tainacan-form-item.vue +++ b/src/classes/field-types/tainacan-form-item.vue @@ -52,7 +52,9 @@ export default { name: 'TainacanFormItem', props: { - field: Object + field: { + type: Object + } }, data(){ return { diff --git a/webpack.config.js b/webpack.config.js index 9c8b17426..d6c820cdc 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,6 @@ let path = require('path'); let webpack = require('webpack'); +const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); module.exports = { entry: { @@ -55,7 +56,7 @@ module.exports = { }, resolve: { alias: { - 'vue$': 'vue/dist/vue.js' + 'vue$': 'vue/dist/vue.esm.js' } }, devServer: { @@ -79,16 +80,15 @@ if (process.env.NODE_ENV === 'production') { NODE_ENV: '"production"' } }), - // new webpack.optimize.UglifyJsPlugin({ - // compress: { - // warnings: false - // } - // }), - // new webpack.LoaderOptionsPlugin({ - // minimize: true - // }) + new UglifyJsPlugin({ + parallel: true, + sourceMap: true, + }), + new webpack.LoaderOptionsPlugin({ + minimize: true + }) ]); - // module.exports.resolve.alias = { - // 'vue$': 'vue/dist/vue.min.js' - // } + module.exports.resolve.alias = { + 'vue$': 'vue/dist/vue.min.js' + } } \ No newline at end of file