@vixoniccom/module-packager 2.11.0-dev.6 → 2.11.0-dev.7

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.
@@ -48,9 +48,15 @@
48
48
  console.log('No parameters:', err.message)
49
49
  }
50
50
 
51
- let escaped = path.join(options.mode === 'watch' ? options.src : options.build, 'test', 'downloads')
52
- if (options.mode === 'watch') escaped = `file://${escaped}`
53
- escaped = escaped.replace(/\\/g, '/')
51
+ let escaped;
52
+ if (options.mode === 'watch') {
53
+ // Sirve los archivos desde el servidor webpack-dev-server
54
+ escaped = `http://localhost:${options.port}/test/downloads`;
55
+ } else {
56
+ // En producción, usa file://
57
+ escaped = `file://${path.join(options.build, 'test', 'downloads')}`;
58
+ }
59
+ escaped = escaped.replace(/\\/g, '/');
54
60
  data.downloadsPath = escaped
55
61
 
56
62
  try {
@@ -19,7 +19,6 @@ export default (env = {}, argv = {}) => {
19
19
  const isDev = options.mode === 'watch';
20
20
  const buildPath = path.resolve(options.build);
21
21
  const controllerHtmlPath = path.resolve(options.src, 'index.html');
22
- console.log("🚀 ~ controllerHtmlPath:", controllerHtmlPath);
23
22
  const controllerStaticPath = path.resolve(path.dirname(controllerHtmlPath), '../static');
24
23
  const controllerFontsPath = path.resolve(path.dirname(controllerHtmlPath), '../fonts');
25
24
  return {
@@ -126,7 +125,13 @@ export default (env = {}, argv = {}) => {
126
125
  },
127
126
  devtool: isDev ? 'eval' : false,
128
127
  devServer: isDev ? {
129
- static: false,
128
+ static: [
129
+ {
130
+ directory: path.resolve(options.src, 'test'),
131
+ publicPath: '/test',
132
+ watch: true,
133
+ }
134
+ ],
130
135
  open: false,
131
136
  client: {
132
137
  overlay: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vixoniccom/module-packager",
3
- "version": "2.11.0-dev.6",
3
+ "version": "2.11.0-dev.7",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "vixonic-module-packager": "./dist/main.js"
@@ -29,7 +29,7 @@
29
29
  "@electron/remote": "^2.1.2",
30
30
  "@types/which": "^3.0.4",
31
31
  "@vixoniccom/module-controller": "2.0.0-dev.3",
32
- "@vixoniccom/modules": "F2.20.1-dev.0",
32
+ "@vixoniccom/modules": "2.20.1-dev.0",
33
33
  "archiver": "^5.3.0",
34
34
  "clean-webpack-plugin": "^4.0.0",
35
35
  "cli-color": "^1.2.0",
@@ -49,6 +49,8 @@
49
49
  "webpack": "^5.99.8",
50
50
  "webpack-cli": "^6.0.1",
51
51
  "webpack-dev-server": "^5.2.1",
52
+ "css-loader": "^7.1.2",
53
+ "style-loader": "^4.0.0",
52
54
  "which": "^5.0.0"
53
55
  },
54
56
  "devDependencies": {
@@ -58,12 +60,10 @@
58
60
  "@types/node": "^20.11.25",
59
61
  "@types/webpack-env": "^1.18.8",
60
62
  "concurrently": "^9.1.2",
61
- "css-loader": "^7.1.2",
62
63
  "npm-run-all": "^4.1.5",
63
64
  "sass": "^1.88.0",
64
65
  "sass-loader": "^16.0.5",
65
66
  "standard-version": "^9.3.1",
66
- "style-loader": "^4.0.0",
67
67
  "wait-on": "^8.0.3"
68
68
  }
69
69
  }