forked from nitayneeman/made-with-love
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
36 lines (35 loc) · 848 Bytes
/
webpack.config.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
36
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: './projects/schematics/src/ng-add/index.js',
output: {
path: path.resolve(__dirname, 'dist/made-with-love/schematics/ng-add'),
filename: 'index.js',
libraryTarget: 'commonjs2'
},
mode: 'production',
target: 'node',
externals: [
nodeExternals({
whitelist: ['schematics-utilities', 'npm-registry-client']
})
],
plugins: [
new CopyWebpackPlugin(
[
{
from: 'projects/schematics/src/collection.json',
to: '../collection.json',
toType: 'file'
},
{
from: 'README.md',
to: '../../README.md',
toType: 'file'
}
],
{}
)
]
};