connector-wordpress/webpack.config.js

31 lines
607 B
JavaScript
Raw Normal View History

2021-12-09 19:46:19 +01:00
/* eslint-disable no-undef */
const path = require('path')
2021-12-09 19:46:19 +01:00
const CopyPlugin = require('copy-webpack-plugin')
2021-12-09 19:46:19 +01:00
const FOLDER_SOURCE = './source'
module.exports = {
2021-12-14 17:51:13 +01:00
entry: FOLDER_SOURCE + '/front/events-loader.js',
output: {
filename: 'events-loader.js',
2021-12-14 17:51:13 +01:00
path: path.resolve(__dirname, 'build/' + '/front'),
},
plugins: [
new CopyPlugin({
patterns: [
{
2021-12-14 17:51:13 +01:00
context: FOLDER_SOURCE,
from: '**/*.php',
to: '../',
},
{
2021-12-14 17:51:13 +01:00
context: FOLDER_SOURCE,
from: '**/*.txt',
to: '../',
},
],
}),
],
2021-12-09 19:46:19 +01:00
}