mirror of
https://gh.wpcy.net/https://github.com/lubusIN/visual-blueprint-builder.git
synced 2026-05-02 08:58:57 +08:00
25 lines
No EOL
652 B
JavaScript
25 lines
No EOL
652 B
JavaScript
const defaultConfig = require('@wordpress/scripts/config/webpack.config');
|
|
const { getWebpackEntryPoints } = require('@wordpress/scripts/utils/config');
|
|
const path = require('path');
|
|
const glob = require('glob');
|
|
|
|
const entries = {
|
|
...getWebpackEntryPoints(),
|
|
editor: './src/editor/index.js',
|
|
};
|
|
|
|
glob.sync('./src/steps/**/index.js').forEach((filePath) => {
|
|
const name = path
|
|
.relative('./src', filePath)
|
|
.replace(/\.js$/, '');
|
|
entries[name] = filePath;
|
|
});
|
|
|
|
module.exports = {
|
|
...defaultConfig,
|
|
entry: entries,
|
|
output: {
|
|
path: path.resolve(__dirname, 'build'),
|
|
filename: '[name].js'
|
|
}
|
|
}; |