makepack 1.3.3 → 1.3.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makepack",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "type": "module",
5
5
  "description": "A CLI tool to create, build, and manage JavaScript, TypeScript, React, and React-TypeScript libraries for npm projects.",
6
6
  "files": [
@@ -15,13 +15,14 @@ const pack = async (args) => {
15
15
  const entries = files.map(entry => path.join(process.cwd(), entry))
16
16
  let loader = logLoader("Generating a production build for the package...")
17
17
  const esbuildConfig = await loadConfig('esbuild.config.js') || {}
18
+
18
19
  esbuild.buildSync({
19
20
  // minify: true,
20
21
  sourcemap: true,
21
22
  format: "esm",
22
23
  platform: 'node',
23
24
  loader: { '.ts': 'ts' },
24
- tsconfig: path.join(process.cwd(), 'tsconfig.json'),
25
+ // tsconfig: path.join(process.cwd(), 'tsconfig.json'),
25
26
  ...esbuildConfig,
26
27
  entryPoints: entries,
27
28
  outdir: path.join(process.cwd(), args.outdir),
package/src/helpers.js CHANGED
@@ -62,7 +62,8 @@ export const loadConfig = async (file) => {
62
62
  const viteConfigPath = path.resolve(process.cwd(), file);
63
63
  if (fs.existsSync(viteConfigPath)) {
64
64
  try {
65
- return await import(pathToFileURL(viteConfigPath).href);
65
+ const c = await import(pathToFileURL(viteConfigPath).href)
66
+ return c.default || {}
66
67
  } catch (error) {
67
68
  }
68
69
  }