profile
viewpoint
HcySunYang HcySunYang undefined Beijing, China http://hcysun.me/homepage/ motto: The purpose of learning is to create.

HcySunYang/finger-mover 316

🥊A motion effect library that integrates Fingerd and Moved

HcySunYang/h5_frame 63

基于webpack和vue.js搭建的H5开发框架

HcySunYang/deepick 2

🔨Pick objects in depth according to the given pattern

HcySunYang/front-end-interview-handbook 2

🕸 Almost complete answers to "Front-end Job Interview Questions" which you can use to interview potential candidates, test yourself or completely ignore

HcySunYang/excelize 1

Golang library for reading and writing Microsoft Excel™ (XLSX) files.

HcySunYang/30-seconds-of-code 0

Curated collection of useful Javascript snippets that you can understand in 30 seconds or less.

HcySunYang/acorn 0

A small, fast, JavaScript-based JavaScript parser

HcySunYang/animateplus 0

A+ animation module for the modern web

push eventshuidi-fed/vapperjs.org

HcySunYang

commit sha 6bc7907ea07d1c6c73ab9e26076483e4c813c1db

deploy

view details

push time in an hour

push eventshuidi-fed/vapperjs.org

HcySunYang

commit sha e0c7b5ae6b59e9e1dee49bd28ed3f681c3367ed4

feat: remove clientModuleName

view details

push time in an hour

issue closedshuidi-fed/vapper

期望自定义 server 后,在 server 端修改时自动重启 server

在使用 自定义 Server 功能之后,很容易遇到的一个问题就是,在开发过程中经常性修改 server 端的文件。

修改之后理想期望是可以自动重启 server,而不需要整体手动重启。

closed time in 15 hours

cloudcome

issue commentshuidi-fed/vapper

期望自定义 server 后,在 server 端修改时自动重启 server

本质上这不是 vapper 要负责的内容,你可以参考已有的 nodejs 应用的开发模式,例如 pm2 等。

cloudcome

comment created time in 15 hours

push eventshuidi-fed/vapper

王有闻

commit sha f0c8ea3d5abeb7ead13d20096fe1092cd53f494d

feat(plugin): remove clientModuleName option when calling api.addEnhanceFile (#78) affects: @vapper/core, @vapper/plugin-cookie ISSUES CLOSED: #76

view details

push time in 21 hours

PR merged shuidi-fed/vapper

feat(core): remove clientModuleName option when calling api.addEnha…

…nceFile

affects: @vapper/core, @vapper/plugin-cookie

ISSUES CLOSED: #76

+6 -10

0 comment

5 changed files

xiaoxiaoaobama

pr closed time in 21 hours

issue closedshuidi-fed/vapper

compile enhance.template.ejs

When the clientModuleName of multiple plugins is the same, an error will be reported when parsing enhancement.template.ejs:

// vapper.config.js
const myVapperPlugin = require('./testPlugin')

module.exports = {
  plugins: [
    ['@vapper/plugin-cookie'],
    [myVapperPlugin]
  ]
}
// testPlugin.js
const path = require('path')

module.exports = (api) => {
  api.addEnhanceFile({
    needCompile: false,
    client: path.resolve(__dirname, './m.js'),
    server: path.resolve(__dirname, './m.js'),
    clientModuleName: 'cookie'
  })
}

Run yarn build, the console displays the error message, as follows:

image

I think passing in the index value when compiling the enhancement.template.ejs file is a solution, for example:


import cookie_0 from '../../../plugin-cookie/lib/cookie.js'

import cookie_1 from '../../../../../testPlugin/cookie.js.js'

import xx_2 from 'xx'

import xx_3 from 'xx'

export default function (options) {
  
    cookie_0(options)
  
    cookie_1(options)

    xx_2(options)

    xx_3(options)
}

closed time in 21 hours

xiaoxiaoaobama

issue commentshuidi-fed/vapper

compile enhance.template.ejs

Can you submit a PR for our discussion(include https://github.com/shuidi-fed/vapper/issues/77)?

xiaoxiaoaobama

comment created time in 2 days

issue closedshuidi-fed/vapper

a question about clientModuleName

When I use api.addEnhanceFile, the clientModuleName property passed in makes me confused, for example:

api.addEnhanceFile ({
       needCompile: false,
       server: path.resolve (__ dirname, './sentry-server.js'),
       clientModuleName: 'sentryServer'
})

I want to generate a file that enhances the runtime of the server. The clientModuleName property makes me first feel that it is needed to generate the client file.

I checked the clientModuleName related code and found that this clientModuleName will be used when generating server and client files.

// enhance.template.ejs
<% for (const enhanceObj of enhanceFiles) {%>
import <%-enhanceObj.clientModuleName%> from '<%-type === "client"? enhanceObj.client: enhanceObj.server%>'
<%}%>

export default function (options) {
   <% for (const enhanceObj of enhanceFiles) {%>
     <%-enhanceObj.clientModuleName%> (options)
   <%}%>
}

In this case, would it be more accurate to rewrite clientModuleName to moduleName?

closed time in 2 days

xiaoxiaoaobama

issue commentshuidi-fed/vapper

a question about clientModuleName

You are right, let's discuss it here: https://github.com/shuidi-fed/vapper/issues/76.

xiaoxiaoaobama

comment created time in 2 days

issue commentshuidi-fed/vapper

compile enhance.template.ejs

Maybe we can automatically generate the clientModuleName so that users don't need to care about it.

xiaoxiaoaobama

comment created time in 2 days

issue closedshuidi-fed/vapper

Modify server or client webpack configuration in vapper plugin

hi, I am developing the sentry plugin for vapper.

The plugin needs to distinguish between client and server builds, and then make different modifications to the webpack configuration, as follows:

module.exports = (api) => {
  api.chainWebpack(config => {
    if (isClient) {
      // ...
    }

    if (!isClient) {
      // ...
    }
  })
}

After that, I found process.env.VAPPER_TARGET in the documentation, and use it to distinguish between server-side and client-side builds in the plugin:

module.exports = (api) => {
  api.chainWebpack(config => {
    if (process.env.VAPPER_TARGET === 'client') {
      // ...
    }

    if (process.env.VAPPER_TARGET === 'server') {
      // ...
    }
  })
}

I hope that the Writing a plugin part of the document can increase the above cases, so that developers can quickly get solutions.

closed time in 2 days

xiaoxiaoaobama

issue commentshuidi-fed/vapper

Modify server or client webpack configuration in vapper plugin

Aha, it's here: https://vapperjs.org/injection.html#process-env-vapper-target.

xiaoxiaoaobama

comment created time in 2 days

push eventshuidi-fed/vapper

HcySunYang

commit sha da4e91ca43f3da41c936d3eeb3e7e07a2769771b

chore(release): publish - @vapper/plugin-cookie@1.0.3

view details

HcySunYang

commit sha 5fd6041966384c09fd32fb9efa6a18de34752687

chore(release): publish - @vapper/plugin-cookie@1.0.3

view details

HcySunYang

commit sha 8769fb085133632745e672f41ce58076a7daed1c

chore(release): publish - @vapper/plugin-cookie@1.0.3

view details

HcySunYang

commit sha 1008d52bf26b2f15a8e91869ffdc3a07043b8463

chore(release): publish - @vapper/plugin-cookie@1.0.4

view details

HcySunYang

commit sha 6eca817d850ce4d6e233a01334b1a19d68de0d33

chore(release): publish - @vapper/plugin-cookie@1.0.4

view details

HcySunYang

commit sha 7bf5c184b05dea8822b2d31d9ba90793b53409f7

chore(release): publish - @vapper/plugin-cookie@1.0.4

view details

push time in 5 days

created tagshuidi-fed/vapper

tag@vapper/plugin-cookie@1.0.4

🔥 A Vue-based server-side rendering framework

created time in 5 days

push eventshuidi-fed/vapper

HcySunYang

commit sha 202868d22bc134fec4b5c0aeed41cd1a62a0e16b

chore(release): publish - @vapper/core@1.3.1 - @vapper/plugin-cookie@1.0.3

view details

HcySunYang

commit sha adc6b1e0443c888523af1c99f2cbb792ee50c571

chore(release): publish - @vapper/core@1.3.1

view details

HcySunYang

commit sha 034635192c808c059a8fe4ec55f37898182e02e6

chore(release): publish - @vapper/core@1.3.1

view details

push time in 5 days

created tagshuidi-fed/vapper

tag@vapper/plugin-cookie@1.0.3

🔥 A Vue-based server-side rendering framework

created time in 5 days

created tagshuidi-fed/vapper

tag@vapper/core@1.3.1

🔥 A Vue-based server-side rendering framework

created time in 5 days

push eventshuidi-fed/vapper

HcySunYang

commit sha c2842db9874767429da986079a17afb67eaaf067

refactor: the cookie plugin does not need to be compiled affects: @vapper/plugin-cookie

view details

push time in 5 days

push eventshuidi-fed/vapper

HcySunYang

commit sha a889d0786a6d41d9d038b4f060e86454a5270218

refactor: rename property affects: @vapper/core

view details

push time in 5 days

issue closedshuidi-fed/vapper

纯 csr 模式下,入口操作浏览器能力报错

Describe the bug

image

To Reproduce

设置为 ssr = false,表示当前 vue 应用只以 csr 模式运行

// vapper.config.js

module.exports = {
    ssr: false
};

在入口里需要依赖一个模块,里面有对浏览器能力的引用(这种情况是无可避免的)

// src/main.js

import Vue from 'vue'
import VueRouter from 'vue-router'
import App from './App.vue'

Vue.use(VueRouter);

// 假设我们需要依赖一个模块,里面有对浏览器能力的引用
document.body.classList.add('vapper');

export default function createApp() {
    const router = new VueRouter({
        mode: 'history',
        routes: [
            {
                path: '/',
                component: () => import('./Home.vue')
            }
        ]
    });

    return {
        head: {},
        router,
        render: h => h(App)
    };
}

Expected behavior

期望不会报错,在 csr 模式下。可复现的工程 https://github.com/cloudcome/vapper-examples/tree/master/csr

closed time in 7 days

cloudcome

issue commentshuidi-fed/vapper

纯 csr 模式下,入口操作浏览器能力报错

Closed due to inactivity

cloudcome

comment created time in 7 days

issue closedshuidi-fed/vapper

TypeError: t.apply is not a function

1.在@0.x版本中序列化bug,项目中引入@0.18.4,ssr设为true的路由组件中设置needSerialize:true,打包后运行控制台出现如下错误(TypeError: t.apply is not a function)

2.升级到@1.x版本后,问题依然存在

image

image

组件中代码结构大致如下

{
     needSerialize: true,
     async created() {
        await this.getNews('xx');
        await this.getNews('xxx');
     },
     mounted() {
         this.$root.$children[0].Bus.$emit('nav-top', this.topNav);
         this.$root.$children[0].Bus.$emit('nav-bottom', this.currNav);
     },
     methods: {
         getNews(code) {
             return this.$axios.getData(‘xxxx’).then(res => {})
         }
     }
}

closed time in 7 days

bromiao

issue commentshuidi-fed/vapper

TypeError: t.apply is not a function

我提供了一个可运行的例子:https://github.com/HcySunYang/vapper-issue-63 基于你的代码进行改动,关键在于路由需要使用 history 模式。

bromiao

comment created time in 7 days

create barnchHcySunYang/vapper-issue-63

branch : master

created branch time in 7 days

created repositoryHcySunYang/vapper-issue-63

created time in 7 days

issue commentshuidi-fed/vapper

TypeError: t.apply is not a function

我看例子中的 @vapper/core 版本是 0.18.x,可以尝试一下最新版本嘛

bromiao

comment created time in 7 days

issue commentshuidi-fed/vapper

自定义express server后,配置项template无效

请提供可复现的工程

fa-ge

comment created time in 7 days

push eventshuidi-fed/vapper

HcySunYang

commit sha 96648d7e43dfbbfb80d34f57ec8225d3a5843c4d

chore: upgrade vapper/core in examples

view details

push time in 7 days

push eventHcySunYang/scroll-flip-page

Hex

commit sha c9321107c2622282252dedba6f346f6f817a655d

修复一个错别字 :)

view details

HcySunYang

commit sha 3d275bacdf28499fc8bd8edfccc785fe6e9c77fd

Merge pull request #7 from hex-ci/patch-1 修复一个错别字

view details

push time in 7 days

issue commentshuidi-fed/vapper

Problem with `.vapper_server.js`

This is really a problem, thanks. But here is a workaround: https://vapperjs.org/write-plugin.html#optional-compilation

thierrymichel

comment created time in 9 days

push eventshuidi-fed/vapper

HcySunYang

commit sha 2e92cc1f37f0ea44b803b0520dad8e2d7bca7f8c

chore: tweak examples

view details

push time in 9 days

create barnchshuidi-fed/vapper

branch : murmurhash

created branch time in 9 days

startednewren/git-filter-repo

started time in 9 days

push eventshuidi-fed/vapperjs.org

HcySunYang

commit sha 81f1f8deb962682f8ceaba3f88bdee12757ed2c9

deploy

view details

push time in 12 days

push eventshuidi-fed/vapperjs.org

HcySunYang

commit sha 81194373c4c5a3dadbd7ae6404230601f70ed1fd

feat: supplementary documentation

view details

push time in 12 days

push eventshuidi-fed/vapperjs.org

HcySunYang

commit sha 4e1d24d33873cb1aa03193c7930c91ee9de44593

deploy

view details

push time in 13 days

push eventshuidi-fed/vapperjs.org

HcySunYang

commit sha d903374b77dca38ca26c11ba6b917ee5304e7196

feat: Compile the enhancement files

view details

push time in 13 days

push eventshuidi-fed/vapper

HcySunYang

commit sha 37954ef269e0dfdb0c05f444ae9915ee3998d71e

test: add tests for enhance-file compilation affects: @vapper/core

view details

push time in 13 days

push eventshuidi-fed/vapper

HcySunYang

commit sha d4795fd893c433bb400d97feb6262e7657399c8f

test: make the test pass affects: @vapper/core

view details

push time in 14 days

created tagshuidi-fed/vapper

tag@vapper/configer-poi@1.1.0

🔥 A Vue-based server-side rendering framework

created time in 14 days

created tagshuidi-fed/vapper

tag@vapper/configer-vue-cli@1.1.0

🔥 A Vue-based server-side rendering framework

created time in 14 days

created tagshuidi-fed/vapper

tag@vapper/core@1.3.0

🔥 A Vue-based server-side rendering framework

created time in 14 days

push eventshuidi-fed/vapper

HcySunYang

commit sha d81752c58284dfffde7db2dc8ec01b828ed7df54

chore(release): publish - @vapper/core@1.3.0 - @vapper/configer-poi@1.1.0 - @vapper/configer-vue-cli@1.1.0

view details

push time in 14 days

push eventshuidi-fed/vapper

HcySunYang

commit sha bfb498d38a957dfa743ddf0c84ebdeaf9e3089f3

refactor(core): adjust the order of plugins affects: @vapper/core

view details

push time in 14 days

push eventshuidi-fed/vapper

HcySunYang

commit sha 78606332afad6f2fa973cb1ca984432a7c39e176

feat(core): optional compilation of enhancement files affects: @vapper/core

view details

push time in 14 days

push eventshuidi-fed/vapper

HcySunYang

commit sha 4865f98b79d9ca41a03a93923603b8e2f866e13c

chore: add a comment for enhanceObj affects: @vapper/core

view details

push time in 14 days

push eventshuidi-fed/vapper

王有闻

commit sha bc80086cdca1d8f5a78f543da60359829957e79d

feat(core): supports `before:setup/after:setup` middleware hook (#70) * feat(plugins): support templates in plugins affects: @vapper/core, @vapper/shared-utils * refactor(plugins): update templateFunction params affects: @vapper/core * refactor(shared-utils): remove shared-utils affects: @vapper/core * chore(jest): remove shared-utils in jest config * refactor(comment): update comment in generateEnhanceFile affects: @vapper/core * chore: rename variables & debug logs affects: @vapper/core * feat(middleware): supports before: setup middleware hook affects: @vapper/core * chore: tweak debug info affects: @vapper/core * feat(core): allow registration of the \`after:setup\` middleware affects: @vapper/core Co-authored-by: HcySunYang <HcySunYang@outlook.com>

view details

push time in 14 days

PR merged shuidi-fed/vapper

feat(core): supports `before:setup/after:setup` middleware hook

affects: @vapper/core

+41 -8

0 comment

3 changed files

xiaoxiaoaobama

pr closed time in 14 days

push eventxiaoxiaoaobama/vapper

HcySunYang

commit sha 55a4aae1df715775ad595967572c7969b484ae49

feat(core): allow registration of the \`after:setup\` middleware affects: @vapper/core

view details

push time in 14 days

push eventxiaoxiaoaobama/vapper

wangyouwen

commit sha f596f3ebdf0f63f03e86648d4952c7d7b84f6503

feat(plugins): support templates in plugins affects: @vapper/core, @vapper/shared-utils

view details

wangyouwen

commit sha 12bbd75410b0a8b95af542839641f27e2d0809a1

refactor(plugins): update templateFunction params affects: @vapper/core

view details

wangyouwen

commit sha 83c4dbef36ade8031ad53ed0cc78a1f011aca22d

refactor(shared-utils): remove shared-utils affects: @vapper/core

view details

wangyouwen

commit sha 434f028114f3e586dd2ed88c52797374abd3fbd1

chore(jest): remove shared-utils in jest config

view details

wangyouwen

commit sha 4516960ee474efbd49234bc8cb70b3314e7f032d

refactor(comment): update comment in generateEnhanceFile affects: @vapper/core

view details

HcySunYang

commit sha 33ba36eeb5b17e4c27d44d142b5846b21d86afc4

chore: rename variables & debug logs affects: @vapper/core

view details

HcySunYang

commit sha dadf958602c9a409c1469fb0bb093e7c79988a4b

Merge branch 'master' of https://github.com/xiaoxiaoaobama/vapper

view details

HcySunYang

commit sha f3f6307f284bf986253f89b7c6c1cbc5640cf199

chore: tweak debug info affects: @vapper/core

view details

push time in 14 days

issue closedshuidi-fed/vapper

希望支持@vue/cli4.2.2 谢谢

当前@vue/cli-service 已经有4.2.2,希望升级支持一下4.x 目前只支持3.x

closed time in 14 days

zengxiaohui2019

issue commentshuidi-fed/vapper

希望支持@vue/cli4.2.2 谢谢

支持,这里有可运行的例子:https://github.com/shuidi-fed/vapper-vue-cli-4-example

zengxiaohui2019

comment created time in 14 days

push eventshuidi-fed/vapper-vue-cli-4-example

HcySunYang

commit sha 9d941487f5d88d0c113e62bccf21360532fde7e0

chore: upgrade deps

view details

push time in 14 days

push eventshuidi-fed/vapper

王有闻

commit sha 3e6091095f48cc92af7b9907033f5cd3439c90eb

feat(core): supports compilation of enhanced files (#68) * feat(plugins): support templates in plugins affects: @vapper/core, @vapper/shared-utils * refactor(plugins): update templateFunction params affects: @vapper/core * refactor(shared-utils): remove shared-utils affects: @vapper/core * chore(jest): remove shared-utils in jest config * refactor(comment): update comment in generateEnhanceFile affects: @vapper/core * chore: rename variables & debug logs affects: @vapper/core Co-authored-by: HcySunYang <HcySunYang@outlook.com>

view details

push time in 14 days

push eventxiaoxiaoaobama/vapper

HcySunYang

commit sha 33ba36eeb5b17e4c27d44d142b5846b21d86afc4

chore: rename variables & debug logs affects: @vapper/core

view details

push time in 15 days

Pull request review commentshuidi-fed/vapper

feat(plugins): support templates in plugins

 class Vapper extends PluginApi {       })   } +  async compilePluginTemplate (type, templatePath, compileOptions) {+    const templateFile = fs.readFileSync(templatePath)++    const templateOptions = {+      imports: {+        serialize,+        serializeFunction,+        ...this.pluginTemplateImportsOption+      },+      interpolate: /<%=([\s\S]+?)%>/g+    }++    const templateFunction = template(templateFile, templateOptions)++    const content = templateFunction({+      options: {+        ...compileOptions+      }+    })++    const compiledPluginOutput = path.resolve(+      path.dirname(templatePath),+      type === 'client' ? this.clientPluginOutPutName : this.serverPluginOutPutName+    )++    await fs.remove(compiledPluginOutput)+    await fs.ensureFile(compiledPluginOutput)+    fs.writeFileSync(compiledPluginOutput, content, 'utf-8')+  }+   async generateEnhanceFile () {     const compiled = template(this.enhanceTemplate) +    this.enhanceFiles.forEach(async enhanceObj => {+      const { client, clientOptions, server, serverOptions } = enhanceObj++      // compiler client && server plugins template

Use 'compile client and server plugin templates' instead.

xiaoxiaoaobama

comment created time in 15 days

Pull request review commentshuidi-fed/vapper

feat(plugins): support templates in plugins

+const serialize = require('serialize-javascript')

Add a comment at the top of the file: Copy from [link].

xiaoxiaoaobama

comment created time in 15 days

Pull request review commentshuidi-fed/vapper

feat(plugins): support templates in plugins

+[+  'serialize'+].forEach(m => {+  Object.assign(exports, require(`./lib/${m}`))+})

Does not need to be a separate module

xiaoxiaoaobama

comment created time in 15 days

push eventshuidi-fed/vapper

HcySunYang

commit sha e0d7abfcb8ddeca589b0c3389bb70da51ff4e496

feat(core): apply user-defined webpack chain functions affects: @vapper/core, @vapper/configer-poi, @vapper/configer-vue-cli

view details

push time in 15 days

issue commentshuidi-fed/vapper

TypeScript example not working after update

This example has been updated, please try again

overpod

comment created time in 16 days

push eventshuidi-fed/vapper

HcySunYang

commit sha 9caeba981381b916c746af03f7a831c0a8f78fed

chore: update typescript example ISSUES CLOSED: #67

view details

push time in 16 days

issue closedshuidi-fed/vapper

TypeScript example not working after update

After updating the sample packages to the most recent.

vue.runtime.esm.js:620 [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
(found in <Root>)

To Reproduce Download https://github.com/shuidi-fed/vapper/tree/master/examples/typescript update all packages

yarn dev

closed time in 16 days

overpod

push eventshuidi-fed/vapper-vue-cli-example

HcySunYang

commit sha 49ff5011b8872118829b0fea51ec64a2ed3024e5

feat: upgrade vapper core

view details

push time in 19 days

issue closedshuidi-fed/vapper

Cannot set property '$$redirect' of undefined when migrating from v0.x to v1.x

image

I follow the migrate guide and use vapper-vue-cli-example (the vapper v0.17.0)

yarn upgrade to v1.2.1 (and some other 1.x version, the same problem)

It's a simple example that all use default config so I only modify the creatApp function:

  // 2. Create a app instance
  const app = new Vue({
    router,
    // This is necessary, it is for vue-meta
    head: {},
    render: h => h(App)
  })

  // 3. return
-  return { app, router }

+  return app

and cause the error

then I view the source code @vapper/core/app/creatApp.js

export default function createAppAPI (context) {
  const rootOptions = createApp(context)
  Object.assign(rootOptions, context.rootOptions)
  return rootOptions
}

it return a instance of Vue

and in @vapper/core/app/serverEntry.js

  const rootOptions = createAppAPI(context) // line#29
  const { router, store, apolloProvider } = rootOptions

  // Add helpers
  router.$$redirect = createServerRedirect(context.res) // line#56
  router.$$type = TYPE

router will be undefined and cause the server error and error in clinet Cannot read property 'beforeHooks' of undefined

I modify the source code @vapper/core/app/creatApp.js and it works

-  return rootOptions

+  return rootOptions.$options

is it a bug or I do sth wrong between migrating?

and the example has no store or other plugins

closed time in 20 days

xiamu33

issue commentshuidi-fed/vapper

Cannot set property '$$redirect' of undefined when migrating from v0.x to v1.x

Don't use new Vue:

const app = {
    router,
    // This is necessary, it is for vue-meta
    head: {},
    render: h => h(App)
}
xiamu33

comment created time in 20 days

push eventshuidi-fed/vapperjs.org

HcySunYang

commit sha 38809392a59a87a281e7700862a6ff63c56b04f5

deploy

view details

push time in 21 days

push eventshuidi-fed/vapperjs.org

HcySunYang

commit sha f5dcf8f75cbb75aff820d8127925168c0666e4fb

feat: state injection

view details

push time in 21 days

push eventshuidi-fed/vapper

HcySunYang

commit sha 6522c1caec282fe682843f56483774074fd568e2

chore(release): publish - @vapper/core@1.2.1

view details

push time in 21 days

created tagshuidi-fed/vapper

tag@vapper/core@1.2.1

🔥 A Vue-based server-side rendering framework

created time in 21 days

issue closedshuidi-fed/vapper

Using `head()` and `needXxxxx` throws an error on HMR

Describe the bug A clear and concise description of what the bug is.

Using head() and needXxxxx throws an error on HMR

To Reproduce Steps to reproduce the behavior:

  1. Clone Minimal reproduction
  2. yarn and yarn start
  3. Open src/App.vue
  4. Change something to force HMR (e.g. meta: { title: 'New title' })
  5. See console error

Expected behavior No error

Stack

vue.runtime.esm.js:1887 TypeError: selfCreatedHook.apply is not a function
at VueComponent._callee2$ (prefetcher.js:160)
at tryCatch (runtime.js:45)
at Generator.invoke [as _invoke] (runtime.js:271)
at Generator.prototype.<computed> [as next] (runtime.js:97)
at asyncGeneratorStep (asyncToGenerator.js:12)
at _next (asyncToGenerator.js:34)
at eval (asyncToGenerator.js:41)
at new Promise (<anonymous>)
at VueComponent.eval (asyncToGenerator.js:30)
at VueComponent.eval (prefetcher.js:171)

Additional context Great chance that this bug is related to this Pull request

closed time in 21 days

thierrymichel

issue commentshuidi-fed/vapper

Using `head()` and `needXxxxx` throws an error on HMR

Close https://github.com/shuidi-fed/vapper/commit/8e55871b276a5c8c74c1d8f8889dff388a861e7b

thierrymichel

comment created time in 21 days

push eventshuidi-fed/vapper

Thierry Michel

commit sha 8e55871b276a5c8c74c1d8f8889dff388a861e7b

fix(core): :bug: fix prefetcher async hook with vue-meta (#61)

view details

push time in 21 days

PR merged shuidi-fed/vapper

fix(core): :bug: fix prefetcher async hook with vue-meta

Array.prototype.splice returns an array, we need to use his first item…

+1 -1

3 comments

1 changed file

thierrymichel

pr closed time in 21 days

push eventshuidi-fed/vapper

HcySunYang

commit sha 89479e6f9e31b092293bc04d9b9ba57c310273c5

chore(release): publish - @vapper/core@1.2.0

view details

push time in 21 days

created tagshuidi-fed/vapper

tag@vapper/core@1.2.0

🔥 A Vue-based server-side rendering framework

created time in 21 days

push eventshuidi-fed/vapper

HcySunYang

commit sha 0a4ad781164e76ea27a5f1e4e94cd6002ed1414f

chore: add the extended initial state example

view details

push time in 21 days

PullRequestEvent

push eventshuidi-fed/vapper

HcySunYang

commit sha 35b8d673bbaa92cdc00b7d163e13e09d7a7fdc70

feat(core): allows extension of context.state affects: @vapper/core

view details

push time in 22 days

push eventshuidi-fed/vapperjs.org

HcySunYang

commit sha 68f3104342d55b9bec175eb7ffa4d524825af488

deploy

view details

push time in 23 days

push eventshuidi-fed/vapperjs.org

HcySunYang

commit sha 245fa4076ce7acb915ea7f0019e23c0ae4946d67

feat: runtimeCompiler

view details

push time in 23 days

issue commentshuidi-fed/vapper

vue runtimeCompiler 模式下报错

Please use: @vapper/core@1.1.1.

cloudcome

comment created time in 23 days

push eventshuidi-fed/vapper

HcySunYang

commit sha d972f2892a993fae73efe05889120dbfe27f4320

chore(release): publish - @vapper/core@1.1.1 - @vapper/configer-poi@1.0.2 - @vapper/configer-vue-cli@1.0.2 - @vapper/plugin-cookie@1.0.2 - @vapper/plugin-prerender@1.0.1 - @vapper/webpack-config@1.1.1

view details

push time in 23 days

push eventshuidi-fed/vapper

HcySunYang

commit sha 47ce86026f8a3fd80edcc010c69d5b46125a8cd9

chore(release): publish - @vapper/core@1.1.0 - @vapper/configer-poi@1.0.1 - @vapper/configer-vue-cli@1.0.1 - @vapper/webpack-config@1.1.0

view details

push time in 23 days

push eventshuidi-fed/vapper

HcySunYang

commit sha 426f2b6f08a447dcbdfc909b9a7d48aff9d74a1c

feat(core): support runtimeCompiler affects: @vapper/core, @vapper/webpack-config ISSUES CLOSED: #60

view details

push time in 23 days

issue closedshuidi-fed/vapper

vue runtimeCompiler 模式下报错

Describe the bug

image

To Reproduce

设置 runtimeCompiler 为 true

// vue.config.js

module.exports = {
    // @ref https://cli.vuejs.org/zh/config/#runtimecompiler
    runtimeCompiler: true,
};

在组件中用到了编译环境的 vue

<template>
    <div ref="home"></div>
</template>

<script>
import Vue from 'vue';

export default {
    name: 'Home',

    mounted() {
        this.vue = new Vue({
            el: this.$refs.home,
            data: {
                hello: 'world'
            },
            template: '<div>{{ hello }}</div>'
        });
    },

    destroyed() {
        this.vue.$destroy();
        this.vue = null;
    }
}
</script>

可复现工程 https://github.com/cloudcome/vapper-examples/tree/master/runtime-compiler

closed time in 23 days

cloudcome

issue commentshuidi-fed/vapper

TypeError: t.apply is not a function

可以提供一个可复现的项目吗?这里有一个项目模板:https://github.com/shuidi-fed/vapper-vue-cli-example

bromiao

comment created time in 23 days

issue commentshuidi-fed/vapper

纯 csr 模式下,入口操作浏览器能力报错

使用 process.client 临时解决:

if (process.client) {
  // 假设我们需要依赖一个模块,里面有对浏览器能力的引用
  document.body.classList.add('vapper');
}
cloudcome

comment created time in 23 days

PR closed shuidi-fed/vapper

fix(core): :bug: fix prefetcher async hook with vue-meta

Array.prototype.splice returns an array, we need to use his first item…

+1 -1

2 comments

1 changed file

thierrymichel

pr closed time in 23 days

pull request commentshuidi-fed/vapper

fix(core): :bug: fix prefetcher async hook with vue-meta

@thierrymichel Thanks, but this is not necessary.

thierrymichel

comment created time in 23 days

startedcli/cli

started time in 24 days

issue commentshuidi-fed/vapper

vue.config > publichPath 和 (new Router).base 导致 ssr 404 错误

删除掉 vapper.config.js 中的 publicPath

cloudcome

comment created time in a month

created tagshuidi-fed/vapper

tag@vapper/core@1.0.4

🔥 A Vue-based server-side rendering framework

created time in a month

push eventshuidi-fed/vapper

HcySunYang

commit sha d9b2d0e72c7a3ca4236cc1dd01dd87a168469561

chore(release): publish - @vapper/core@1.0.4

view details

push time in a month

push eventshuidi-fed/vapper

HcySunYang

commit sha 99332984afe66cf7a6f970c7d2c8792481e4683d

fix: remove comments affects: @vapper/core

view details

push time in a month

issue commentshuidi-fed/vapper

vue.config > publichPath 和 (new Router).base 导致 ssr 404 错误

Please use: @vapper/core@^1.0.3.

cloudcome

comment created time in a month

created tagshuidi-fed/vapper

tag@vapper/core@1.0.3

🔥 A Vue-based server-side rendering framework

created time in a month

push eventshuidi-fed/vapper

HcySunYang

commit sha d83bbb31f09f250d2bd648fac97b3fb2244f6d34

chore(release): publish - @vapper/core@1.0.3

view details

push time in a month

more