Skip to content

Commit

Permalink
fix: SSR usage needs seperate css
Browse files Browse the repository at this point in the history
  • Loading branch information
simllll committed May 6, 2019
1 parent db98bbe commit 5b92a80
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
16 changes: 9 additions & 7 deletions build/rollup.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import resolve from 'rollup-plugin-node-resolve'
import vue from 'rollup-plugin-vue'
import cjs from 'rollup-plugin-commonjs'
import replace from 'rollup-plugin-replace'
import { eslint } from 'rollup-plugin-eslint'
// import { eslint } from 'rollup-plugin-eslint'
import fs from 'fs'
import CleanCSS from 'clean-css'
import css from 'rollup-plugin-css-only'

const config = require('../package.json')

Expand All @@ -16,13 +17,14 @@ export default {
mainFields: ['module', 'jsnext', 'browser'],
}),
cjs(),
eslint(),
// eslint(),
css({ output: (style) => {
const file = require.resolve('vue-resize/dist/vue-resize.css')
style += fs.readFileSync(file, { encoding: 'utf8' })
fs.writeFileSync('dist/vue-virtual-scroller.css', new CleanCSS().minify(style).styles)
} }),
vue({
css (style) {
const file = require.resolve('vue-resize/dist/vue-resize.css')
style += fs.readFileSync(file, { encoding: 'utf8' })
fs.writeFileSync('dist/vue-virtual-scroller.css', new CleanCSS().minify(style).styles)
},
css: false,
compileTemplate: true,
template: {
isProduction: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hokify/vue-virtual-scroller",
"description": "Smooth scrolling for any amount of data",
"version": "1.0.0-rc.4",
"version": "1.0.0-rc.5",
"publishConfig": {
"access": "public"
},
Expand Down
9 changes: 7 additions & 2 deletions src/components/RecycleScroller.vue
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,12 @@ export default {
}
</script>

<style>
<style lang="scss">
.b {
color: green;
}
</style>
<!--style>
.vue-recycle-scroller {
position: relative;
}
Expand Down Expand Up @@ -612,4 +617,4 @@ export default {
.vue-recycle-scroller.ready.direction-horizontal .vue-recycle-scroller__item-view {
height: 100%;
}
</style>
</style-->

0 comments on commit 5b92a80

Please sign in to comment.