@vixoniccom/module-packager 2.7.0-test.16 → 2.7.0-test.2

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 CHANGED
@@ -2,99 +2,6 @@
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.7.0-test.16](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.15...v2.7.0-test.16) (2022-07-19)
6
-
7
-
8
- ### Bug Fixes
9
-
10
- * **release:** json-loader was added to modules loaders ([55fc98f](https://gitlab.com/mandomedio/vixonic/module-packager/commit/55fc98fb8638b4ea796007345045b4ca3efb7db2))
11
-
12
- ## [2.7.0-test.15](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.14...v2.7.0-test.15) (2022-07-15)
13
-
14
-
15
- ### Bug Fixes
16
-
17
- * **release:** some comments and console.logs were removed ([d717b11](https://gitlab.com/mandomedio/vixonic/module-packager/commit/d717b1177718410498ad60fe933cb28675cd5373))
18
-
19
- ## [2.7.0-test.14](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.13...v2.7.0-test.14) (2022-07-15)
20
-
21
-
22
- ### Bug Fixes
23
-
24
- * **reease:** imports changes were reverted ([a449420](https://gitlab.com/mandomedio/vixonic/module-packager/commit/a449420bc9e48695aba99576caa592e209ba33ca))
25
-
26
- ## [2.7.0-test.13](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.12...v2.7.0-test.13) (2022-07-15)
27
-
28
-
29
- ### Bug Fixes
30
-
31
- * **release:** all requires were updated by imports and also new webpack properties were added to the configuration ([d9a73d6](https://gitlab.com/mandomedio/vixonic/module-packager/commit/d9a73d6e7f2ae31cbbdb475a38bd07fa7159e7ca))
32
-
33
- ## [2.7.0-test.12](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.11...v2.7.0-test.12) (2022-07-15)
34
-
35
-
36
- ### Bug Fixes
37
-
38
- * **release:** copy-webpack-plugin was upgrated ([291d1b9](https://gitlab.com/mandomedio/vixonic/module-packager/commit/291d1b9d5dda24a220cf2eabfef6d31059ca3d4f))
39
-
40
- ## [2.7.0-test.11](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.10...v2.7.0-test.11) (2022-07-15)
41
-
42
-
43
- ### Bug Fixes
44
-
45
- * **release:** html-webpack-plugin was updated ([ae99388](https://gitlab.com/mandomedio/vixonic/module-packager/commit/ae99388e82ba7fe16ffca89f2f7cbc842dbb6739))
46
-
47
- ## [2.7.0-test.10](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.9...v2.7.0-test.10) (2022-07-15)
48
-
49
-
50
- ### Bug Fixes
51
-
52
- * **release:** exclude variable was updated ([a40d017](https://gitlab.com/mandomedio/vixonic/module-packager/commit/a40d017ad5744ecfae966e5e60edeaaa167a2265))
53
-
54
- ## [2.7.0-test.9](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.8...v2.7.0-test.9) (2022-07-15)
55
-
56
-
57
- ### Bug Fixes
58
-
59
- * **release:** __dirname was removed ([cad88bb](https://gitlab.com/mandomedio/vixonic/module-packager/commit/cad88bba27d41590fdecab04dddf511dc9fb1df1))
60
-
61
- ## [2.7.0-test.8](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.7...v2.7.0-test.8) (2022-07-15)
62
-
63
-
64
- ### Bug Fixes
65
-
66
- * **release:** exclude variable was updated ([6eca779](https://gitlab.com/mandomedio/vixonic/module-packager/commit/6eca7795b42e32e84afeffe74a98bb7e4b970dd1))
67
-
68
- ## [2.7.0-test.7](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.6...v2.7.0-test.7) (2022-07-15)
69
-
70
-
71
- ### Bug Fixes
72
-
73
- * **Release:** revert __dirname changes ([bb25fe1](https://gitlab.com/mandomedio/vixonic/module-packager/commit/bb25fe10ed9a9368c145530aecdc91f539877a26))
74
-
75
- ## [2.7.0-test.6](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.5...v2.7.0-test.6) (2022-07-15)
76
-
77
-
78
- ### Bug Fixes
79
-
80
- * **release:** contentBase porperty was removed ([8b364cc](https://gitlab.com/mandomedio/vixonic/module-packager/commit/8b364cc84298210491844856564ada198c356561))
81
-
82
- ## [2.7.0-test.5](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.4...v2.7.0-test.5) (2022-07-15)
83
-
84
-
85
- ### Bug Fixes
86
-
87
- * **Release:** default value of config in options variable was reverted ([9c75fac](https://gitlab.com/mandomedio/vixonic/module-packager/commit/9c75fac9c189bfe5a7857c9a5f68ef50dcc3cc6b))
88
-
89
- ## [2.7.0-test.4](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.3...v2.7.0-test.4) (2022-07-15)
90
-
91
-
92
- ### Bug Fixes
93
-
94
- * **release:** __dirname was added to path resolves and joins ([7312c9a](https://gitlab.com/mandomedio/vixonic/module-packager/commit/7312c9a316c4039dd63c979754d97733c6159a90))
95
-
96
- ## [2.7.0-test.3](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.2...v2.7.0-test.3) (2022-07-15)
97
-
98
5
  ## [2.7.0-test.2](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.1...v2.7.0-test.2) (2022-07-15)
99
6
 
100
7
 
package/main.js CHANGED
@@ -114,7 +114,7 @@ function zip (callback) {
114
114
 
115
115
  function watch () {
116
116
  var server = new WebpackDevServer(webpack(require(options.config)(options)), {
117
- static: path.join(__dirname, options.src, '..')
117
+ contentBase: path.join(__dirname, options.src, '..')
118
118
  })
119
119
  server.listen(options.port)
120
120
 
package/package.json CHANGED
@@ -62,13 +62,13 @@
62
62
  "clean-webpack-plugin": "^0.1.10",
63
63
  "cli-color": "^1.2.0",
64
64
  "command-line-args": "^3.0.1",
65
- "copy-webpack-plugin": "^4.6.0",
65
+ "copy-webpack-plugin": "^3.0.1",
66
66
  "css-loader": "^0.24.0",
67
67
  "electron": "^11.4.12",
68
68
  "electron-debug": "^3.2.0",
69
69
  "file-loader": "^0.9.0",
70
70
  "html-loader": "^0.4.3",
71
- "html-webpack-plugin": "^4.5.2",
71
+ "html-webpack-plugin": "^2.22.0",
72
72
  "json-loader": "^0.5.4",
73
73
  "lodash": "^4.17.21",
74
74
  "node-sass": "^6.0.1",
@@ -104,7 +104,7 @@
104
104
  "prerelease-test": "standard-version --prerelease test",
105
105
  "release": "standard-version"
106
106
  },
107
- "version": "2.7.0-test.16",
107
+ "version": "2.7.0-test.2",
108
108
  "devDependencies": {
109
109
  "standard-version": "^9.3.1"
110
110
  }
package/webpack.config.js CHANGED
@@ -7,26 +7,28 @@ const webpack = require('webpack')
7
7
  const path = require('path')
8
8
  const _ = require('lodash')
9
9
  const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
10
+ const fs = require('fs')
10
11
 
11
12
  module.exports = (options) => {
12
13
  if (options.target === 'web') {
13
14
  options.externals = [...(options.externals || []), 'electron']
14
15
  }
15
16
 
16
- let exclude = [path.resolve(options.src, 'static'), path.resolve(options.src, 'test')]
17
+ // let tsconfigPath = fs.existsSync(path.join(options.src, '..', 'tsconfig.json')) ? path.join(options.src, '..', 'tsconfig.json') : path.join(__dirname, 'tsconfig.json')
18
+ // const typescriptPath = path.join(options.src, '..', 'node_modules', 'typescript', '/')
19
+ // const typescript = fs.existsSync(typescriptPath) ? path.join(__dirname, path.relative(__dirname, typescriptPath), '/') : 'typescript'
20
+
21
+ let exclude = options.mode === 'watch'
22
+ ? [path.join(options.src, 'static'), path.join(options.src, 'test')]
23
+ : [path.resolve(options.src, 'static'), path.resolve(options.src, 'test')]
17
24
 
18
25
  let config = {
19
- mode: 'production',
20
26
  context: __dirname,
21
27
  entry: ['babel-polyfill', path.resolve(options.src, 'main')],
22
28
  output: {
23
29
  path: path.resolve(options.build),
24
30
  filename: 'main.js'
25
31
  },
26
- performance: {
27
- maxAssetSize: 1000000,
28
- maxEntrypointSize: 1000000
29
- },
30
32
  node: {
31
33
  __dirname: options.mode === 'watch',
32
34
  fs: 'empty',
@@ -42,19 +44,17 @@ module.exports = (options) => {
42
44
  ]
43
45
  },
44
46
  module: {
45
- loaders: [
47
+ rules: [
46
48
  {
47
49
  test: /\.json$/,
48
50
  exclude: exclude,
49
51
  loader: 'json-loader'
50
- }
51
- ],
52
- rules: [
52
+ },
53
53
  {
54
54
  test: /\.(j|t)sx?$/,
55
55
  include: [path.resolve(options.src)],
56
56
  exclude: exclude,
57
- rules: [
57
+ loaders: [
58
58
  {
59
59
  loader: 'babel-loader?babelrc=false&extends=' + path.join(__dirname, '/.babelrc')
60
60
  },
@@ -127,7 +127,7 @@ module.exports = (options) => {
127
127
  config.output.publicPath = `http://localhost:${options.port}/`
128
128
  config.devtool = 'source-map'
129
129
  config.devServer = {
130
- static: path.resolve(options.src),
130
+ contentBase: path.resolve(options.src),
131
131
  publicPath: `http://localhost:${options.port}/`,
132
132
  inline: true
133
133
  }