-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Build embedded Parity JS properly and separatly #4426
Conversation
js/src/ui/index.js
Outdated
export ActionbarExport from './Actionbar/Export'; | ||
export ActionbarImport from './Actionbar/Import'; | ||
export ActionbarSearch from './Actionbar/Search'; | ||
export ActionbarSort from './Actionbar/Sort'; |
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.
Aligning with the exports as done in Form
& Container
would actually be quire good -
export Actionbar, { Export as ActionbarExport, ...} from './Actionbar;
Alternatively since these are sub components, making them static on Actionbar
, only exporting it and then using Actionbar.Export
could also work.
export Label from './Label'; | ||
export RadioButtons from './RadioButtons'; | ||
export Select from './Select'; | ||
export TypedInput from './TypedInput'; |
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.
+1
if (!process.env.EMBED) { | ||
const worker = require('./worker'); | ||
|
||
module.exports = { setupWorker: worker.setupWorker }; |
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.
Since nothing else is used, why not -
const setupWorker = require('./worker').setupWorker;
module.exports = { setupWorker }
Would probably add a TODO
here for when babel finally supports non top-level imports
Build is failing, seems like polyfill issues maybe? |
Updated : tests passing |
Looks good, however only to be merged after 1.5.2 is released. (Makes backporting much more difficult) |
For paritytech/parity-extension#19
Updates Webpack and build the embedded parity bar as a separate build.
Emits a
embed.json
file that contains the needed assets.Some components of the
~/ui
have been deleted from theindex.js
file : the editor and the PasswordStrength ones. This is because their dependencies are quite big, and Webpack 2 tree-shaking doesn't work that well : it wouldn't exclude them from the embed build, whereas the components are not used.It seems that the production build was in fact not working (minification wasn't occurring) coming from the fact that we didn't transpile EthereumJS-Tx. Now it's fixed.
Webpack has been updated to the latest stable release.