Skip to content

Commit 2c7b03d

Browse files
committed
^ wp5
1 parent 20b1ade commit 2c7b03d

14 files changed

Lines changed: 10979 additions & 895 deletions

.layers.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,25 @@
8585
}
8686
}
8787
},
88+
"wwwDev": {
89+
"rootFolder": "src/App",
90+
"config": "./etc/wp/webpack.config.www.js",
91+
"vars": {
92+
"targetDir": "dist/www",
93+
"devServer": true,
94+
"DefinePluginCfg": {
95+
"__IS_SERVER__": false,
96+
"__IS_DEV__": true
97+
},
98+
"production": false,
99+
"babelPreset": {
100+
"targets": {
101+
"browsers": "> 0.25%, not dead, safari >= 6, ios >= 6, chrome >= 52"
102+
},
103+
"loose": true
104+
}
105+
}
106+
},
88107
"defaultServer": "api",
89108
"api": {
90109
"rootFolder": "src/App",
@@ -99,12 +118,29 @@
99118
}
100119
},
101120
"Comp": "component",
121+
"CompDev": "componentDev",
102122
"component": {
103123
"rootFolder": "src/Comp",
104124
"config": "./etc/wp/webpack.config.comp.js",
105125
"vars": {
106126
"production": true,
107127
"externals": true,
128+
"DefinePluginCfg": {
129+
"__IS_DEV__": false
130+
},
131+
"targetDir": "dist",
132+
"rootAlias": "Comp"
133+
}
134+
},
135+
"componentDev": {
136+
"rootFolder": "src/Comp",
137+
"config": "./etc/wp/webpack.config.comp.js",
138+
"vars": {
139+
"production": false,
140+
"externals": true,
141+
"DefinePluginCfg": {
142+
"__IS_DEV__": true
143+
},
108144
"targetDir": "dist",
109145
"rootAlias": "Comp"
110146
}
@@ -128,5 +164,28 @@
128164
"loose": true
129165
}
130166
}
167+
},
168+
"staticDev": {
169+
"rootFolder": "src/AppStatic",
170+
"config": "./etc/wp/webpack.config.static.js",
171+
"vars": {
172+
"production": false,
173+
"devServer": true,
174+
"targetDir": "dist/static",
175+
"rootAlias": "App",
176+
"DefinePluginCfg": {
177+
"__IS_SERVER__": false,
178+
"__IS_DEV__": true
179+
},
180+
"HtmlWebpackPlugin": {
181+
"template": "<%&packagePath%>/src/AppStatic/index.html.tpl"
182+
},
183+
"babelPreset": {
184+
"targets": {
185+
"browsers": "> 0.25%, not dead, safari >= 6, ios >= 6, chrome >= 52"
186+
},
187+
"loose": true
188+
}
189+
}
131190
}
132191
}

LICENCE.HEAD.MD

Lines changed: 0 additions & 21 deletions
This file was deleted.

etc/wp/webpack.config.api.js

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -68,33 +68,29 @@ module.exports = [
6868
rules: [
6969
{
7070
test : /\.jsx?$/,
71-
exclude: lpackCfg.vars.babelInclude
72-
?
73-
(
74-
includeRE => ( { test: path => ( isExcluded.test(path) && !includeRE.test(path) ) } )
75-
)(new RegExp(lpackCfg.vars.babelInclude))
76-
:
77-
isExcluded,
78-
use : {
79-
loader : 'babel-loader',
80-
options: {
81-
cacheDirectory: true, //important for performance
82-
presets : [
83-
['@babel/preset-env',
84-
{
85-
...( lpackCfg.vars.babelPreset || {} )
86-
}], "@babel/react"],
87-
plugins : [
88-
["@babel/plugin-proposal-decorators", { "legacy": true }],
89-
["@babel/plugin-transform-runtime", {}],
90-
["@babel/plugin-proposal-optional-chaining", {}],
91-
["@babel/proposal-class-properties", { loose: true }],
92-
"@babel/proposal-object-rest-spread",
93-
"@babel/plugin-syntax-dynamic-import"
94-
95-
]
96-
}
97-
}
71+
exclude: isExcluded,
72+
use : [
73+
{
74+
loader : 'babel-loader',
75+
options: {
76+
cacheDirectory: true, //important for performance
77+
presets : [
78+
['@babel/preset-env',
79+
{
80+
...(lpackCfg.vars.babelPreset || {})
81+
}],
82+
'@babel/preset-react'
83+
],
84+
plugins : [
85+
["@babel/plugin-proposal-decorators", { "legacy": true }],
86+
['@babel/plugin-proposal-class-properties', {
87+
"loose": true
88+
}],
89+
["@babel/plugin-transform-runtime", {}],
90+
]
91+
}
92+
},
93+
]
9894
},
9995
{
10096
test: /\.(png|jpg|gif|svg|woff2|ttf|eot)(\?.*$|$)$/,
@@ -105,16 +101,16 @@ module.exports = [
105101
use : "url-loader?prefix=font/&limit=5000&mimetype=application/font-woff&name=assets/[hash].[ext]"
106102
},
107103
{ test: /\.html$/, use: "file-loader?name=[name].[ext]" },
108-
{ test: /\.tpl$/, loader: "dot-tpl-loader?append=true" },
104+
{ test: /\.tpl$/, use: "dot-tpl-loader?append=true" },
109105
{
110106
test : /\.(scss|css|less)(\?.*$|$)$/,
111-
loader: 'null-loader'
107+
use: 'null-loader'
112108
},
113109

114110
{ test: /\.otf(\?.*$|$)$/, use: "file-loader?name=assets/[hash].[ext]" },
115111
{
116112
test : /\.json?$/,
117-
loader: 'strip-json-comments-loader'
113+
use: 'strip-json-comments-loader'
118114
}
119115
],
120116
},
@@ -136,7 +132,7 @@ module.exports = [
136132
...lpackCfg.vars.BundleAnalyzerPlugin
137133
})
138134

139-
] || [new webpack.NamedModulesPlugin()] )
135+
] || [] )
140136
],
141137
}
142138
]

0 commit comments

Comments
 (0)