1
0
mirror of https://github.com/dwaxweiler/connector-mobilizon synced 2025-06-05 21:59:25 +02:00

use webpack directly and npm scripts more in general

This commit is contained in:
Daniel Waxweiler
2021-11-09 22:10:35 +01:00
parent 4417ae78b6
commit af46fe974f
7 changed files with 167 additions and 301 deletions

31
webpack.config.js Normal file
View File

@ -0,0 +1,31 @@
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const PACKAGE = require('./package.json');
const FOLDER_SOURCE = './source';
module.exports = {
entry: FOLDER_SOURCE + '/' + PACKAGE.name + '/front/events-loader.js',
output: {
filename: 'events-loader.js',
path: path.resolve(__dirname, 'build/' + PACKAGE.name + '/front'),
},
plugins: [
new CopyPlugin({
patterns: [
{
context: FOLDER_SOURCE + '/' + PACKAGE.name,
from: '**/*.php',
to: '../',
},
{
context: FOLDER_SOURCE + '/' + PACKAGE.name,
from: '**/*.txt',
to: '../',
},
],
}),
],
};