-
Notifications
You must be signed in to change notification settings - Fork 404
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
Shift to Webpack based build system for JS files #224
Shift to Webpack based build system for JS files #224
Conversation
I get an exception when I try this:
|
Is it possible to make this optional? It makes debugging difficult. |
const HtmlWebpackPlugin = require("html-webpack-plugin"); | ||
|
||
// All of the files will be outputted in build_js | ||
const buildRootPath = path.resolve(__dirname).replace("src", "build_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.
Would be nice to avoid the use of build_js here. Maybe using cmake's configure_file?
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.
I don't have the context to do a detailed review, but overall moving to a js build system that supports modules and incremental builds is a great idea!
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 goes wayy over my head, I have no idea how most of those things work.
But formatting looks okay 😅
Amanpreet showed me where I can find the sources in the chrome debugger so this is no longer a concern. |
- Update circle ci also to do npm install
bfa65cc
to
581edb9
Compare
src/esp/bindings_js/bindings.html
Outdated
</body> | ||
|
||
</html> | ||
</html> |
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.
Add newline.
* Add new deps for webpack based building * Add webpack configuration * Shift to module based system for ES6 loading * Update CMakeLists * Remove unsused vars checks from navigate and simenv * Update cmakelists to do npm install as well * Update circle ci also to do npm install
Motivation and Context
This PR introduces Webpack based build system which will allow us to target older browsers while using newer > ES6 features. Following features are introduced:
In future, I will look into compile
hsim_bindings.js
also into the same file.How Has This Been Tested
./build_js.sh and bindings.html in browser.
For Building On Your Side
Pull the change locally, run
npm install
, run./build_js.sh
and open bindings.html in browser.Types of changes
Checklist