Created
October 1, 2022 15:41
-
-
Save wpflames/abaf6918582257e4cd36acf75aad81cc to your computer and use it in GitHub Desktop.
Changing file entry and output of build scripts
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
| const path = require('path'); | |
| const defaultConfig = require("./node_modules/@wordpress/scripts/config/webpack.config"); | |
| module.exports = { | |
| ...defaultConfig, | |
| entry: { | |
| index: path.resolve( __dirname, 'assets/js', 'index.js' ), | |
| }, | |
| output: { | |
| filename: '[name].js', | |
| path: path.resolve( __dirname, 'dist/js' ), | |
| }, | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment