generated from bsi-software/bsi-cx-design-master-template-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
68 lines (63 loc) · 2.81 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
const path = require('path');
const package = require('./package.json');
const {BuildConfig, WebpackConfigBuilder, Version, DesignType, ModuleConfig} = require('@bsi-cx/design-build');
const landingpageBuildConfig = new BuildConfig()
.withName('bsi-elements-cx-22.0-landingpage')
.withVersion(package.version)
.withDesignType(DesignType.LANDINGPAGE)
.withTargetVersion(Version.CX_22_0)
.withRootPath(path.resolve(__dirname, 'templates', 'landingpage'))
.withAssetResourceRuleFilename('static/[name][ext]')
.withPropertiesFilePath(path.resolve(__dirname, 'properties.js'))
.withModulesRootPath('modules')
.withModules(
new ModuleConfig()
.withName('main')
.withPath('main.js'))
.withAdditionalFilesToCopy({
from: path.resolve(__dirname, 'templates', 'shared', 'static', 'header.png'),
to: 'static/header.png',
});
const websiteBuildConfig = new BuildConfig()
.withName('bsi-elements-cx-22.0-website')
.withVersion(package.version)
.withDesignType(DesignType.WEBSITE)
.withTargetVersion(Version.CX_22_0)
.withRootPath(path.resolve(__dirname, 'templates', 'website'))
.withAssetResourceRuleFilename('static/[name][ext]')
.withPropertiesFilePath(path.resolve(__dirname, 'properties.js'))
.withModulesRootPath('modules')
.withModules(
new ModuleConfig()
.withName('main')
.withPath('main.js'))
.withAdditionalFilesToCopy({
from: path.resolve(__dirname, 'templates', 'shared', 'static', 'header.png'),
to: 'static/header.png',
});
module.exports = WebpackConfigBuilder.fromConfigs(
// websiteBuildConfig.clone()
// .withName('bsi-elements-cx-1.3-website')
// .withTargetVersion(Version.CX_1_3)
// .withPropertiesFilePath(path.resolve(__dirname, 'properties-de.js')),
// websiteBuildConfig.clone()
// .withName('bsi-elements-cx-22.0-website')
// .withPropertiesFilePath(path.resolve(__dirname, 'properties-de.js')),
websiteBuildConfig.clone()
.withName('bsi-elements-cx-23.2-website')
.withTargetVersion(Version.CX_23_2)
.withPropertiesFilePath(path.resolve(__dirname, 'properties-de.js')),
// landingpageBuildConfig.clone()
// .withName('bsi-elements-cx-1.3-landingpage-de')
// .withTargetVersion(Version.CX_1_3)
// .withPropertiesFilePath(path.resolve(__dirname, 'properties-de.js')),
// landingpageBuildConfig.clone()
// .withName('bsi-elements-cx-22.0-landingpage-de')
// .withPropertiesFilePath(path.resolve(__dirname, 'properties-de.js')),
landingpageBuildConfig.clone()
.withName('bsi-elements-cx-23.2-landingpage-de')
.withTargetVersion(Version.CX_23_2)
.withPropertiesFilePath(path.resolve(__dirname, 'properties-de.js'))
/*landingpageBuildConfig.clone()
.withName('bsi-elements-cx-22.0-landingpage-en')
.withPropertiesFilePath(path.resolve(__dirname, 'properties-en.js'))*/);