Created
October 31, 2022 01:33
-
-
Save landbryo/346d2d8b8822a9a9123ef882bff7e5b6 to your computer and use it in GitHub Desktop.
Example webpack.config.js file for extending wp-scripts build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* External Dependencies | |
*/ | |
const path = require('path'); | |
/** | |
* WordPress Dependencies | |
*/ | |
const defaultConfig = require('@wordpress/scripts/config/webpack.config.js'); | |
module.exports = { | |
...defaultConfig, | |
...{ | |
entry: { | |
'admin-scripts': path.resolve(process.cwd(), 'src', 'admin.js'), | |
'public-scripts': path.resolve(process.cwd(), 'src', 'public.js'), | |
}, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment