-
Notifications
You must be signed in to change notification settings - Fork 364
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/remaxjs/remax/f4cnbiwin |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 27b54cf:
|
close #983
Codecov Report
@@ Coverage Diff @@
## master #988 +/- ##
==========================================
+ Coverage 95.53% 95.60% +0.06%
==========================================
Files 330 331 +1
Lines 3497 3526 +29
Branches 499 502 +3
==========================================
+ Hits 3341 3371 +30
+ Misses 156 155 -1
Continue to review full report at Codecov.
|
@@ -1,22 +1,24 @@ | |||
require('./runtime.js'); | |||
(my["webpackJsonp"] = my["webpackJsonp"] || []).push([[1],[ | |||
/* 0 */ | |||
require('./remax-vendors.js'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为啥这个会有变化
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onAppConfig(config) { | ||
const onLaunch = config.onLaunch; | ||
config.onLaunch = () => { | ||
console.log('onLaunch'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看起来他有可能把 config 弄坏掉?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do at your own risk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
respect
const pluginTemplate = fs.readFileSync(path.resolve(__dirname, '../../../template/plugin.js.ejs'), 'utf-8'); | ||
const pluginPath = winPath( | ||
path.join( | ||
path.resolve(path.dirname(require.resolve('@remax/runtime')), '..'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path.dirname(require.resolve('@remax/runtime/package.json'))
更简洁,也不受 main
等字段影响
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
开发者要怎么给插件传参数? |
|
运行时的参数呢? |
就用 webpack.DefinePlugin 传进去 |
运行时插件能否给个demo。文档的信息太少了一头雾水 |
close #983
文档 https://remax-git-runtime-plugin.remaxjs.now.sh/guide/advanced/plugin#registerruntimeplugin