-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add inject to "bundle everything" list #2871
Conversation
Ok so I removed the Webpack DLL (used in dev) in production builds, this should do the trick.
|
@@ -41,7 +41,6 @@ module.exports = { | |||
'signaturereg': ['./dapps/signaturereg.js'], | |||
'tokenreg': ['./dapps/tokenreg.js'], | |||
// library | |||
'inject': ['./inject.js'], | |||
'parity': ['./parity.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.
Remove parity.js as well?
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 useful for the Webpack CommonChunks usage, so it separates parity.js
changes from the others (better perf. I think)
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.
ok, cool.
name: 'commons' | ||
}) | ||
); | ||
plugins.push( | ||
new webpack.optimize.CommonsChunkPlugin({ | ||
chunks: [ 'parity' ], | ||
chunks: ['parity'], |
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.
As here - web3/inject & parity should be treated the same.
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.
Ok that's true
@@ -1,4 +1,4 @@ | |||
{ | |||
{ |
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.
These 2 spaces look suspicious :)
@@ -7,6 +7,6 @@ | |||
<title>dev::Web3</title> | |||
</head> | |||
<body> | |||
<script src="inject.js"></script> | |||
<script src="web3.js"></script> |
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.
Can we make this /parity-utils/web.js
(same with /parity-utils/parity.js
in dev.html and for dapp.html as well.)
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.
Will do
Getting the following issues while trying to replicate (https://github.com/ethcore/parity/issues/2868 - at this point getting a diefferent issue, not the one listed, but it still doesn't work) -
Obviously
inject.js
(injecting web3) likeparity.js
should not need the vendor stuff. (I have seen this internally as well.)@ngotchac Could you take a look to make sure my approach here is right from a build prespective?
Fixes #2872