Skip to content

Commit 158e8ef

Browse files
author
Pooya Parsa
committed
feat: improve packaging
1 parent 91065e4 commit 158e8ef

File tree

6 files changed

+6
-12
lines changed

6 files changed

+6
-12
lines changed

examples/basic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const consola = require('..')
1+
const consola = require('../src/cjs')
22

33
consola.start('Starting build')
44

examples/json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const consola = require('..')
1+
const consola = require('../src/cjs')
22

33
consola.clear().add(new consola.JSONReporter())
44

examples/winston.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const consola = require('..')
1+
const consola = require('../src/cjs')
22
const winston = require('winston')
33

44
const wLogger = winston.createLogger({

index.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"name": "consola",
33
"version": "1.1.4",
44
"description": "Elegant Console Logger",
5-
"main": "index.js",
5+
"main": "./dist/consola.cjs.js",
6+
"module": "./src/index.js",
67
"scripts": {
78
"build": "bili",
89
"test": "true",

src/cjs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('esm')(module, { mode: 'all' })('./index.js').default

0 commit comments

Comments
 (0)