-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.ai.js
35 lines (33 loc) · 1.11 KB
/
webpack.ai.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ZipPlugin = require('zip-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = {
mode: 'none', // No optimizations, just copying and zipping
entry: {}, // No actual entry points since we're just copying files
output: {
path: path.resolve(__dirname, 'output/tmp'), // Temporary directory for copied files
},
plugins: [
new CleanWebpackPlugin({
cleanOnceBeforeBuildPatterns: [path.resolve(__dirname, 'output/tmp')],
cleanAfterEveryBuildPatterns: [path.resolve(__dirname, 'output/tmp')],
}),
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname),
to: path.resolve(__dirname, 'output/tmp'),
globOptions: {
ignore: ['**/node_modules/**', '**/output/**', '**/.git/**', '**/.idea/**'],
},
},
],
}),
new ZipPlugin({
filename: 'ai-analysis-export-minimalist-focus-mode.zip',
path: path.resolve(__dirname, 'output'),
pathPrefix: './',
}),
],
};