-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use webpack-config with wp-scritps #6
Conversation
I added logic which changes the output to |
@@ -0,0 +1,3 @@ | |||
const config = require( '@wordpress/scripts/config/webpack.config.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.
Next step, get rid of this file altogether :)
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.
icon: 'heart', | ||
category: 'common', | ||
edit: function() { | ||
return ( createElement( |
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.
Step 2, start using JSX in here without having to import createElement
explicitly :)
This uses webpack-config package with
@wordpress/scripts
. It requires that this plugin:npm install --save-dev --save-exact <path-to-local-scripts-package>
src/index.js
. Output will be atbuild/index.js
Note that current
webpack-config
setup doesn't support JSX.