@cmmn/tools 1.6.4 → 1.6.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.
@@ -14,7 +14,7 @@ import html from '@open-wc/rollup-plugin-html';
14
14
  import json from '@rollup/plugin-json';
15
15
  import alias from '@rollup/plugin-alias';
16
16
  import replace from '@rollup/plugin-replace';
17
-
17
+ import sourcemaps from 'rollup-plugin-sourcemaps';
18
18
  /**
19
19
  * @typedef {import(rollup).RollupOptions} RollupOptions
20
20
  * @typedef {import(rollup).OutputOptions} OutputOptions
@@ -100,7 +100,7 @@ export class ConfigCreator {
100
100
  return serve({
101
101
  open: false,
102
102
  contentBase: [this.outDir, path.join(this.root, 'assets')],
103
- port: this.options.port ?? 3000,
103
+ port: this.options.port,
104
104
  historyApiFallback: true
105
105
  });
106
106
  }
@@ -137,11 +137,9 @@ export class ConfigCreator {
137
137
  dedupe: this.options.dedupe || []
138
138
  }),
139
139
  commonjs({
140
- requireReturnsDefault: "namespace",
141
- dynamicRequireTargets: [
142
- 'node_modules/ulid/*.js'
143
- ]
140
+ requireReturnsDefault: "namespace"
144
141
  }),
142
+ sourcemaps(),
145
143
  builtins(),
146
144
  /*this.options.styles === 'modules' ? postCSS({
147
145
  mode: [
@@ -182,6 +180,9 @@ export class ConfigCreator {
182
180
  if (this.options.html || this.options.input.endsWith('.html')) {
183
181
  result.push(this.html);
184
182
  }
183
+ if (this.options.stats) {
184
+ result.push(this.visualizer);
185
+ }
185
186
  if (this.options.minify) {
186
187
  result.push(terser({
187
188
  module: true,
@@ -195,12 +196,9 @@ export class ConfigCreator {
195
196
  }
196
197
  }));
197
198
  }
198
- if (this.options.devServer) {
199
+ if (this.options.devServer && this.options.port) {
199
200
  result.push(this.devServer, this.livereload);
200
201
  }
201
- if (this.options.stats) {
202
- result.push(this.visualizer);
203
- }
204
202
  return result;
205
203
  }
206
204
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmmn/tools",
3
- "version": "1.6.4",
3
+ "version": "1.6.7",
4
4
  "description": "Compilation, bundling, code generator, testing.",
5
5
  "main": "dist/rollup.config.js",
6
6
  "type": "module",
@@ -61,6 +61,7 @@
61
61
  "rollup-plugin-node-globals": "^1.4.0",
62
62
  "rollup-plugin-postcss": "4.x.x",
63
63
  "rollup-plugin-serve": "^1.1.0",
64
+ "rollup-plugin-sourcemaps": "^0.6.3",
64
65
  "rollup-plugin-string": "^3.0.0",
65
66
  "rollup-plugin-styles": "^4",
66
67
  "rollup-plugin-terser": "^7",
@@ -73,5 +74,5 @@
73
74
  },
74
75
  "author": "",
75
76
  "license": "ISC",
76
- "gitHead": "989b528853a43381e69f33bd3e2bddf955390b07"
77
+ "gitHead": "01c259a853bd898adde91115187af71c666772c5"
77
78
  }