Commit fcf37f49eeb69eade1b878bdcf81a6c93fc50e87
1 parent
9e74a856
update webpack & support Affix
update webpack & support Affix
Showing
4 changed files
with
5 additions
and
6 deletions
Show diff stats
README.md
build/webpack.dev.config.js
@@ -98,10 +98,10 @@ module.exports = { | @@ -98,10 +98,10 @@ module.exports = { | ||
98 | } | 98 | } |
99 | }, | 99 | }, |
100 | plugins: [ | 100 | plugins: [ |
101 | - new ExtractTextPlugin({ filename: '[name].css', disable: false, allChunks: true }), | 101 | + // new ExtractTextPlugin({ filename: '[name].css', disable: false, allChunks: true }), |
102 | // new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS | 102 | // new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS |
103 | // https://doc.webpack-china.org/plugins/commons-chunk-plugin/ | 103 | // https://doc.webpack-china.org/plugins/commons-chunk-plugin/ |
104 | - new webpack.optimize.CommonsChunkPlugin({ name: 'vendors', filename: 'vendor.bundle.js' }) | 104 | + new webpack.optimize.CommonsChunkPlugin({ name: 'vendors', filename: 'vendor.js' }) |
105 | // new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), // 提取第三方库 | 105 | // new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), // 提取第三方库 |
106 | ] | 106 | ] |
107 | }; | 107 | }; |
build/webpack.dist.prod.config.js
src/components/affix/affix.vue
@@ -71,7 +71,7 @@ | @@ -71,7 +71,7 @@ | ||
71 | ]; | 71 | ]; |
72 | } | 72 | } |
73 | }, | 73 | }, |
74 | - ready () { | 74 | + mounted () { |
75 | window.addEventListener('scroll', this.handleScroll, false); | 75 | window.addEventListener('scroll', this.handleScroll, false); |
76 | window.addEventListener('resize', this.handleScroll, false); | 76 | window.addEventListener('resize', this.handleScroll, false); |
77 | }, | 77 | }, |