| 1 |
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' ); |
| 2 |
const Barn2Configuration = require( '@barn2plugins/webpack-config' ); |
| 3 |
|
| 4 |
const config = new Barn2Configuration( |
| 5 |
[ |
| 6 |
'posts-data-table-main/index.js', |
| 7 |
], |
| 8 |
[ |
| 9 |
'admin/posts-data-table-admin.scss', |
| 10 |
'posts-data-table-main.scss', |
| 11 |
], |
| 12 |
defaultConfig |
| 13 |
); |
| 14 |
|
| 15 |
const b2Config = { |
| 16 |
...config.getWebpackConfig(), |
| 17 |
module: { |
| 18 |
rules: [ |
| 19 |
...config.getWebpackConfig().module.rules, |
| 20 |
{ |
| 21 |
test: /\.(woff|woff2|eot|ttf|otf)$/i, |
| 22 |
type: 'asset/resource', |
| 23 |
generator: { |
| 24 |
filename: '../lib/assets/fonts/[name][ext]', |
| 25 |
}, |
| 26 |
}, |
| 27 |
], |
| 28 |
}, |
| 29 |
}; |
| 30 |
|
| 31 |
module.exports = b2Config; |