Skip to content

Commit

Permalink
fix: 🐛 theme.json and webpack.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Herm71 committed Jun 2, 2022
1 parent 0c8c710 commit cc94cb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 38 deletions.
3 changes: 1 addition & 2 deletions theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@
"baseline": "1.25rem",
"medium": "clamp(2rem, 8vw, calc(4 * var(--wp--style--block-gap)))",
"large": "clamp(4rem, 10vw, 8rem)",
"outer": "var(--wp--custom--spacing--small, 1.25rem)",
"wrap": "80rem"
"outer": "var(--wp--custom--spacing--small, 1.25rem)"
},
"border": {
"radius": "0.25rem"
Expand Down
39 changes: 3 additions & 36 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,12 @@ const path = require( 'path' );
*/
const defaultConfig = require( '@wordpress/scripts/config/webpack.config.js' );

/**
* Based on this answer from Stack Overflow
* url: https://stackoverflow.com/questions/35903246/how-to-create-multiple-output-paths-in-webpack-config
*/

var config = {
// TODO: Add common Configuration
module: {},
};

var mainConfig = Object.assign({}, config, {
module.exports = {
...defaultConfig,
...{
entry: {
index: path.resolve(process.cwd(), 'src', 'index.js'),
"theme": path.resolve(process.cwd(), 'src', 'theme.js'),
},
output: {
path: path.resolve(process.cwd(), 'build'),

"theme": path.resolve(process.cwd(), 'src', 'theme.js')
}
},
});

var pluginConfig = Object.assign({}, config, {
...defaultConfig,
...{
name: "plugin",
entry: path.resolve(__dirname, 'src/plugin-content/plugin.scss'),
output: {
path: path.resolve(__dirname, 'build/plugin-content'),
filename: "plugin-content.js",

},
}
});

// Return Array of Configurations
module.exports = [
mainConfig,
];

}

0 comments on commit cc94cb1

Please sign in to comment.