Skip to content

Commit

Permalink
feat(vue3): add __VUE_CREATED_DEFERRED__
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed Jul 28, 2020
1 parent 68cd6c6 commit 7a607da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/vue-cli-plugin-uni/lib/chain-webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@ module.exports = function chainWebpack (platformOptions, vueOptions, api) {

platformOptions.chainWebpack(webpackConfig, vueOptions, api)
// define
const deferredCreated = process.env.UNI_PLATFORM === 'mp-toutiao' ||
process.env.UNI_PLATFORM === 'quickapp-webview'
const defines = {
__VUE_OPTIONS_API__: JSON.stringify(process.env.UNI_USING_VUE3_OPTIONS_API === 'true'),
__VUE_CREATED_DEFERRED__: JSON.stringify(deferredCreated),
'process.env.UNI_ENV': JSON.stringify(process.env.UNI_PLATFORM),
'process.env.UNI_CLOUD_PROVIDER': process.env.UNI_CLOUD_PROVIDER,
'process.env.HBX_USER_TOKEN': JSON.stringify(process.env.HBX_USER_TOKEN || ''),
Expand Down

0 comments on commit 7a607da

Please sign in to comment.