update webpack & support Affix

update webpack & support Affix
This commit is contained in:
梁灏 2017-03-01 12:00:31 +08:00
parent 9e74a856f6
commit fcf37f49ee
4 changed files with 5 additions and 6 deletions

View file

@ -57,7 +57,7 @@
- [ ] Steps - [ ] Steps
- [ ] LoadingBar - [ ] LoadingBar
- [ ] Circle - [ ] Circle
- [ ] Affix - [x] Affix
- [ ] BackTop - [ ] BackTop
- [ ] Spin - [ ] Spin

View file

@ -98,10 +98,10 @@ module.exports = {
} }
}, },
plugins: [ plugins: [
new ExtractTextPlugin({ filename: '[name].css', disable: false, allChunks: true }), // new ExtractTextPlugin({ filename: '[name].css', disable: false, allChunks: true }),
// new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS // new ExtractTextPlugin("[name].css",{ allChunks : true,resolve : ['modules'] }), // 提取CSS
// https://doc.webpack-china.org/plugins/commons-chunk-plugin/ // https://doc.webpack-china.org/plugins/commons-chunk-plugin/
new webpack.optimize.CommonsChunkPlugin({ name: 'vendors', filename: 'vendor.bundle.js' }) new webpack.optimize.CommonsChunkPlugin({ name: 'vendors', filename: 'vendor.js' })
// new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), // 提取第三方库 // new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js'), // 提取第三方库
] ]
}; };

View file

@ -51,7 +51,6 @@ module.exports = {
compress: { compress: {
warnings: false warnings: false
} }
}), })
new webpack.optimize.OccurenceOrderPlugin()
] ]
} }

View file

@ -71,7 +71,7 @@
]; ];
} }
}, },
ready () { mounted () {
window.addEventListener('scroll', this.handleScroll, false); window.addEventListener('scroll', this.handleScroll, false);
window.addEventListener('resize', this.handleScroll, false); window.addEventListener('resize', this.handleScroll, false);
}, },