@vixoniccom/module-packager 2.7.0-test.17 → 2.7.0-test.3

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,104 +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.17](https://gitlab.com/mandomedio/vixonic/module-packager/compare/v2.7.0-test.16...v2.7.0-test.17) (2022-07-19)
6
-
7
-
8
- ### Bug Fixes
9
-
10
- * **release:** json-loader package was removed ([52e59eb](https://gitlab.com/mandomedio/vixonic/module-packager/commit/52e59ebde04e7186433c891adbd53c17348108fd))
11
-
12
- ## [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)
13
-
14
-
15
- ### Bug Fixes
16
-
17
- * **release:** json-loader was added to modules loaders ([55fc98f](https://gitlab.com/mandomedio/vixonic/module-packager/commit/55fc98fb8638b4ea796007345045b4ca3efb7db2))
18
-
19
- ## [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)
20
-
21
-
22
- ### Bug Fixes
23
-
24
- * **release:** some comments and console.logs were removed ([d717b11](https://gitlab.com/mandomedio/vixonic/module-packager/commit/d717b1177718410498ad60fe933cb28675cd5373))
25
-
26
- ## [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)
27
-
28
-
29
- ### Bug Fixes
30
-
31
- * **reease:** imports changes were reverted ([a449420](https://gitlab.com/mandomedio/vixonic/module-packager/commit/a449420bc9e48695aba99576caa592e209ba33ca))
32
-
33
- ## [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)
34
-
35
-
36
- ### Bug Fixes
37
-
38
- * **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))
39
-
40
- ## [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)
41
-
42
-
43
- ### Bug Fixes
44
-
45
- * **release:** copy-webpack-plugin was upgrated ([291d1b9](https://gitlab.com/mandomedio/vixonic/module-packager/commit/291d1b9d5dda24a220cf2eabfef6d31059ca3d4f))
46
-
47
- ## [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)
48
-
49
-
50
- ### Bug Fixes
51
-
52
- * **release:** html-webpack-plugin was updated ([ae99388](https://gitlab.com/mandomedio/vixonic/module-packager/commit/ae99388e82ba7fe16ffca89f2f7cbc842dbb6739))
53
-
54
- ## [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)
55
-
56
-
57
- ### Bug Fixes
58
-
59
- * **release:** exclude variable was updated ([a40d017](https://gitlab.com/mandomedio/vixonic/module-packager/commit/a40d017ad5744ecfae966e5e60edeaaa167a2265))
60
-
61
- ## [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)
62
-
63
-
64
- ### Bug Fixes
65
-
66
- * **release:** __dirname was removed ([cad88bb](https://gitlab.com/mandomedio/vixonic/module-packager/commit/cad88bba27d41590fdecab04dddf511dc9fb1df1))
67
-
68
- ## [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)
69
-
70
-
71
- ### Bug Fixes
72
-
73
- * **release:** exclude variable was updated ([6eca779](https://gitlab.com/mandomedio/vixonic/module-packager/commit/6eca7795b42e32e84afeffe74a98bb7e4b970dd1))
74
-
75
- ## [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)
76
-
77
-
78
- ### Bug Fixes
79
-
80
- * **Release:** revert __dirname changes ([bb25fe1](https://gitlab.com/mandomedio/vixonic/module-packager/commit/bb25fe10ed9a9368c145530aecdc91f539877a26))
81
-
82
- ## [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)
83
-
84
-
85
- ### Bug Fixes
86
-
87
- * **release:** contentBase porperty was removed ([8b364cc](https://gitlab.com/mandomedio/vixonic/module-packager/commit/8b364cc84298210491844856564ada198c356561))
88
-
89
- ## [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)
90
-
91
-
92
- ### Bug Fixes
93
-
94
- * **Release:** default value of config in options variable was reverted ([9c75fac](https://gitlab.com/mandomedio/vixonic/module-packager/commit/9c75fac9c189bfe5a7857c9a5f68ef50dcc3cc6b))
95
-
96
- ## [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)
97
-
98
-
99
- ### Bug Fixes
100
-
101
- * **release:** __dirname was added to path resolves and joins ([7312c9a](https://gitlab.com/mandomedio/vixonic/module-packager/commit/7312c9a316c4039dd63c979754d97733c6159a90))
102
-
103
5
  ## [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)
104
6
 
105
7
  ## [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)
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,14 @@
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
+ "json-loader": "^0.5.4",
72
73
  "lodash": "^4.17.21",
73
74
  "node-sass": "^6.0.1",
74
75
  "raw-loader": "^0.5.1",
@@ -103,7 +104,7 @@
103
104
  "prerelease-test": "standard-version --prerelease test",
104
105
  "release": "standard-version"
105
106
  },
106
- "version": "2.7.0-test.17",
107
+ "version": "2.7.0-test.3",
107
108
  "devDependencies": {
108
109
  "standard-version": "^9.3.1"
109
110
  }
package/webpack.config.js CHANGED
@@ -7,26 +7,29 @@ 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'
17
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')]
24
+
25
+ console.log('Options: ', options, options.src)
18
26
  let config = {
19
- mode: 'production',
20
27
  context: __dirname,
21
28
  entry: ['babel-polyfill', path.resolve(options.src, 'main')],
22
29
  output: {
23
30
  path: path.resolve(options.build),
24
31
  filename: 'main.js'
25
32
  },
26
- performance: {
27
- maxAssetSize: 1000000,
28
- maxEntrypointSize: 1000000
29
- },
30
33
  node: {
31
34
  __dirname: options.mode === 'watch',
32
35
  fs: 'empty',
@@ -43,6 +46,11 @@ module.exports = (options) => {
43
46
  },
44
47
  module: {
45
48
  rules: [
49
+ {
50
+ test: /\.json$/,
51
+ exclude: exclude,
52
+ loader: 'json-loader'
53
+ },
46
54
  {
47
55
  test: /\.(j|t)sx?$/,
48
56
  include: [path.resolve(options.src)],
@@ -120,7 +128,7 @@ module.exports = (options) => {
120
128
  config.output.publicPath = `http://localhost:${options.port}/`
121
129
  config.devtool = 'source-map'
122
130
  config.devServer = {
123
- static: path.resolve(options.src),
131
+ contentBase: path.resolve(options.src),
124
132
  publicPath: `http://localhost:${options.port}/`,
125
133
  inline: true
126
134
  }