-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Secure preview frame #2107
Secure preview frame #2107
Conversation
src/html/preview.html
Outdated
@@ -0,0 +1,5 @@ | |||
<!DOCTYPE html> | |||
<html> | |||
<head> </head> |
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.
Delete extra space
webpack.config.js
Outdated
@@ -361,4 +304,56 @@ module.exports = (env = process.env.NODE_ENV || 'development') => { | |||
}, | |||
devtool, | |||
}; | |||
|
|||
const mainConfig = {...baseConfig}; |
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.
This seems a bit hacky - open to suggestions on how to better make two configs from the same base.
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.
This is totally fine/quite idiomatic! The only thing I would change is just constructing each variant of the config in a single literal, e.g.:
const mainConfig = {
...baseConfig,
name: 'main',
entry: isTest
? undefined
: {
inline: 'first-input-delay',
main: './application.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.
This is cool! So much cleaner!
webpack.config.js
Outdated
@@ -361,4 +304,56 @@ module.exports = (env = process.env.NODE_ENV || 'development') => { | |||
}, | |||
devtool, | |||
}; | |||
|
|||
const mainConfig = {...baseConfig}; |
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.
This is totally fine/quite idiomatic! The only thing I would change is just constructing each variant of the config in a single literal, e.g.:
const mainConfig = {
...baseConfig,
name: 'main',
entry: isTest
? undefined
: {
inline: 'first-input-delay',
main: './application.js',
},
//...
};
4235dfa
to
ba6c11e
Compare
ba6c11e
to
28a9b71
Compare
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.
Nice! A couple final comments, also I want to take it for a spin, but pretty much good to go here.
This reverts commit c2096f8.
Hey @outoftime!
Here's my first pass at #804
preview.html
filepreviewSupport
intopreview.html
via webpacksrcDoc
withsrc
reference topreview.html
source
frompreviewFrame
component to the iframefixes iframe settings to allow for camera/audio accessAppreciate your feedback especially around the chunking in webpack