@vixoniccom/module-packager 2.5.0-dev.0 → 2.5.0-dev.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/package.json +3 -2
- package/webpack.config.js +26 -19
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,61 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [2.5.0-dev.10](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.9...v2.5.0-dev.10) (2021-08-20)
|
|
6
|
+
|
|
7
|
+
## [2.5.0-dev.9](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.8...v2.5.0-dev.9) (2021-08-20)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **release:** UglifyJsPlugin configuration was updated (again) ([768c8fa](https://gitlab.com/mandomedio/vixonic/module-packager/commit/768c8fa901079d6dc385778bbe2e6978d574fb65))
|
|
13
|
+
|
|
14
|
+
## [2.5.0-dev.8](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.7...v2.5.0-dev.8) (2021-08-20)
|
|
15
|
+
|
|
16
|
+
## [2.5.0-dev.7](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.6...v2.5.0-dev.7) (2021-08-20)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **release:** UglifyJsPlugin config was updated ([799da0d](https://gitlab.com/mandomedio/vixonic/module-packager/commit/799da0da127b73e7442489b27f271c3548ef1476))
|
|
22
|
+
|
|
23
|
+
## [2.5.0-dev.6](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.5...v2.5.0-dev.6) (2021-08-20)
|
|
24
|
+
|
|
25
|
+
## [2.5.0-dev.5](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.4...v2.5.0-dev.5) (2021-08-20)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* **release:** import clean-webpack-plugin was revert ([d9a7b87](https://gitlab.com/mandomedio/vixonic/module-packager/commit/d9a7b87c8265a175d2296ec0c2b586a530b2c624))
|
|
31
|
+
|
|
32
|
+
## [2.5.0-dev.4](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.3...v2.5.0-dev.4) (2021-08-20)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* **release:** clean-webpack-plugin version was revert ([a2c8424](https://gitlab.com/mandomedio/vixonic/module-packager/commit/a2c842476cb106cc8ed9f923eaa9e7aed7293e39))
|
|
38
|
+
|
|
39
|
+
## [2.5.0-dev.3](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.2...v2.5.0-dev.3) (2021-08-20)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* **release:** root option in clean-webpack-plugin was removed ([c0cecf1](https://gitlab.com/mandomedio/vixonic/module-packager/commit/c0cecf1554c5dccede258eaa19c9ab965516d016))
|
|
45
|
+
|
|
46
|
+
## [2.5.0-dev.2](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.1...v2.5.0-dev.2) (2021-08-20)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Bug Fixes
|
|
50
|
+
|
|
51
|
+
* **release:** CleanWebpackPlugin import was fixed ([9aa3363](https://gitlab.com/mandomedio/vixonic/module-packager/commit/9aa33639b02fd127bb323c7199e98e98b61c3459))
|
|
52
|
+
|
|
53
|
+
## [2.5.0-dev.1](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.5.0-dev.0...v2.5.0-dev.1) (2021-08-20)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
* **release:** CopyWebpackPlugin options were updated in webpack config ([35b8178](https://gitlab.com/mandomedio/vixonic/module-packager/commit/35b8178fd5b7dc4366774989d75b1fad41703a14))
|
|
59
|
+
|
|
5
60
|
## [2.5.0-dev.0](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.4.3-dev.0...v2.5.0-dev.0) (2021-08-19)
|
|
6
61
|
|
|
7
62
|
|
package/package.json
CHANGED
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"babel-polyfill": "^6.26.0",
|
|
61
61
|
"babel-preset-env": "^1.7.0",
|
|
62
62
|
"babel-preset-react": "^6.24.1",
|
|
63
|
-
"clean-webpack-plugin": "^
|
|
63
|
+
"clean-webpack-plugin": "^1.0.1",
|
|
64
64
|
"cli-color": "^2.0.0",
|
|
65
65
|
"command-line-args": "^5.2.0",
|
|
66
66
|
"copy-webpack-plugin": "^9.0.1",
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"style-loader": "^3.2.1",
|
|
79
79
|
"ts-node": "^10.2.1",
|
|
80
80
|
"typescript": "^4.3.5",
|
|
81
|
+
"uglifyjs-webpack-plugin": "^2.2.0",
|
|
81
82
|
"webpack": "^5.51.1",
|
|
82
83
|
"webpack-dev-server": "^4.0.0"
|
|
83
84
|
},
|
|
@@ -101,7 +102,7 @@
|
|
|
101
102
|
"release": "standard-version",
|
|
102
103
|
"prerelease-dev": "standard-version --prerelease dev"
|
|
103
104
|
},
|
|
104
|
-
"version": "2.5.0-dev.
|
|
105
|
+
"version": "2.5.0-dev.10",
|
|
105
106
|
"devDependencies": {
|
|
106
107
|
"standard-version": "^9.3.1"
|
|
107
108
|
}
|
package/webpack.config.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
const CleanWebpackPlugin = require('clean-webpack-plugin')
|
|
4
|
+
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
|
4
5
|
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
|
5
6
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
|
6
7
|
const webpack = require('webpack')
|
|
@@ -23,18 +24,21 @@ module.exports = (options) => {
|
|
|
23
24
|
|
|
24
25
|
let config = {
|
|
25
26
|
context: __dirname,
|
|
27
|
+
optimization: { minimizer: [] },
|
|
26
28
|
entry: ['babel-polyfill', path.resolve(options.src, 'main')],
|
|
27
29
|
output: {
|
|
28
30
|
path: path.resolve(options.build),
|
|
29
31
|
filename: 'main.js'
|
|
30
32
|
},
|
|
31
33
|
node: {
|
|
32
|
-
__dirname: options.mode === 'watch'
|
|
33
|
-
fs: 'empty',
|
|
34
|
-
net: 'empty',
|
|
35
|
-
tls: 'empty'
|
|
34
|
+
__dirname: options.mode === 'watch'
|
|
36
35
|
},
|
|
37
36
|
resolve: {
|
|
37
|
+
fallback: {
|
|
38
|
+
fs: false,
|
|
39
|
+
net: false,
|
|
40
|
+
tls: false
|
|
41
|
+
},
|
|
38
42
|
extensions: ['.ts', '.tsx', '.js', '.jsx'],
|
|
39
43
|
modules: [
|
|
40
44
|
'node_modules',
|
|
@@ -43,7 +47,7 @@ module.exports = (options) => {
|
|
|
43
47
|
]
|
|
44
48
|
},
|
|
45
49
|
module: {
|
|
46
|
-
|
|
50
|
+
rules: [
|
|
47
51
|
{
|
|
48
52
|
test: /\.json$/,
|
|
49
53
|
exclude: exclude,
|
|
@@ -53,7 +57,7 @@ module.exports = (options) => {
|
|
|
53
57
|
test: /\.(j|t)sx?$/,
|
|
54
58
|
include: [path.resolve(options.src)],
|
|
55
59
|
exclude: exclude,
|
|
56
|
-
|
|
60
|
+
rules: [
|
|
57
61
|
{
|
|
58
62
|
loader: 'babel-loader?babelrc=false&extends=' + path.join(__dirname, '/.babelrc')
|
|
59
63
|
},
|
|
@@ -70,12 +74,12 @@ module.exports = (options) => {
|
|
|
70
74
|
{
|
|
71
75
|
test: /\.scss$/,
|
|
72
76
|
exclude: exclude,
|
|
73
|
-
|
|
77
|
+
use: ['style', 'css', 'sass']
|
|
74
78
|
},
|
|
75
79
|
{
|
|
76
80
|
test: /\.css$/,
|
|
77
81
|
exclude: exclude,
|
|
78
|
-
|
|
82
|
+
use: ['style-loader', 'css-loader']
|
|
79
83
|
},
|
|
80
84
|
{
|
|
81
85
|
test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot|mp4)$/,
|
|
@@ -99,7 +103,14 @@ module.exports = (options) => {
|
|
|
99
103
|
callback()
|
|
100
104
|
},
|
|
101
105
|
plugins: [
|
|
102
|
-
new CopyWebpackPlugin(
|
|
106
|
+
new CopyWebpackPlugin(
|
|
107
|
+
{
|
|
108
|
+
patterns: [{ from: path.resolve(options.src, 'static'), to: 'static/' }]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
copyUnmodified: true
|
|
112
|
+
}
|
|
113
|
+
),
|
|
103
114
|
new HtmlWebpackPlugin({
|
|
104
115
|
inject: 'head',
|
|
105
116
|
template: path.resolve(options.src, 'index.html')
|
|
@@ -123,7 +134,7 @@ module.exports = (options) => {
|
|
|
123
134
|
|
|
124
135
|
if (options.mode === 'watch') {
|
|
125
136
|
config.entry.unshift(`webpack-dev-server/client?http://localhost:${options.port}/`, 'webpack/hot/dev-server', path.resolve(options.src, 'index.html'))
|
|
126
|
-
config.plugins.unshift(new CopyWebpackPlugin([{ from: path.resolve(options.src, 'test'), to: 'test/' }], { copyUnmodified: true }))
|
|
137
|
+
config.plugins.unshift(new CopyWebpackPlugin({ patterns: [{ from: path.resolve(options.src, 'test'), to: 'test/' }] }, { copyUnmodified: true }))
|
|
127
138
|
config.plugins.unshift(new webpack.HotModuleReplacementPlugin())
|
|
128
139
|
config.output.publicPath = `http://localhost:${options.port}/`
|
|
129
140
|
config.devtool = 'source-map'
|
|
@@ -142,19 +153,15 @@ module.exports = (options) => {
|
|
|
142
153
|
'process.env': {
|
|
143
154
|
NODE_ENV: JSON.stringify('production')
|
|
144
155
|
}
|
|
145
|
-
}),
|
|
146
|
-
new webpack.optimize.UglifyJsPlugin({
|
|
147
|
-
compress: {
|
|
148
|
-
warnings: false
|
|
149
|
-
},
|
|
150
|
-
mangle: true,
|
|
151
|
-
minimize: true,
|
|
152
|
-
comments: false
|
|
153
156
|
})
|
|
154
157
|
)
|
|
155
158
|
|
|
159
|
+
config.optimization.minimizer.unshift(
|
|
160
|
+
new UglifyJsPlugin({})
|
|
161
|
+
)
|
|
162
|
+
|
|
156
163
|
if (options.mode === 'run') {
|
|
157
|
-
config.plugins.unshift(new CopyWebpackPlugin([{ from: path.resolve(options.src, 'test'), to: 'test/' }], { copyUnmodified: true }))
|
|
164
|
+
config.plugins.unshift(new CopyWebpackPlugin({ patterns: [{ from: path.resolve(options.src, 'test'), to: 'test/' }] }, { copyUnmodified: true }))
|
|
158
165
|
}
|
|
159
166
|
}
|
|
160
167
|
|