From ea9b9d07d2bacd8517a725a0656080dee9f69022 Mon Sep 17 00:00:00 2001 From: Denis Date: Sun, 21 Feb 2021 17:56:38 +0200 Subject: [PATCH 1/6] add ssr support --- .gitignore | 3 +- README.md | 14 +- bili.config.js | 11 - example/App.vue | 3 +- package-lock.json | 25385 +++++++++++++++++++++++++++----------------- package.json | 21 +- rollup.config.js | 22 + src/index.js | 16 + src/index.vue | 4 +- 9 files changed, 15808 insertions(+), 9671 deletions(-) delete mode 100644 bili.config.js create mode 100644 rollup.config.js create mode 100644 src/index.js diff --git a/.gitignore b/.gitignore index 1a76a61..df467d6 100755 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ .DS_Store node_modules/ dist/ -lib/ +client/ +ssr/ npm-debug.log yarn-error.log .npmignore diff --git a/README.md b/README.md index a0c4874..e67bdbb 100755 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ # vue-element-loading -⏳ Loading inside a container or full screen for Vue.js +⏳ Loading inside a container or full screen for Vue.js SSR support # 👀 Document & Demo Page @@ -61,6 +61,18 @@ export default { }; ``` +# 🕹 SSR Usage +```javascript +import VueElementLoading from "vue-element-loading/ssr"; +import "vue-element-loading/ssr/index.css"; + +export default { + components: { + VueElementLoading + } +}; +``` + # 🔎 Example ## Inside container diff --git a/bili.config.js b/bili.config.js deleted file mode 100644 index 371613b..0000000 --- a/bili.config.js +++ /dev/null @@ -1,11 +0,0 @@ -const vue = require('rollup-plugin-vue'); - -module.exports = { - banner: true, - format: ['umd-min'], - css: true, - plugins: [ - vue({ css: true }) - ], - outDir: 'lib' -}; diff --git a/example/App.vue b/example/App.vue index 7199c7e..02b5a55 100755 --- a/example/App.vue +++ b/example/App.vue @@ -116,8 +116,7 @@