Skip to content

Commit

Permalink
Merge pull request #14 from skgdev/bugfix/include-es-module-in-npm-pa…
Browse files Browse the repository at this point in the history
…ckage

Include ES module in npm package when published
  • Loading branch information
nmargaritis authored Mar 15, 2023
2 parents 5732917 + 1c01374 commit c421cfc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@skgdev/socket.io-msgpack-javascript",
"type": "module",
"version": "1.2.0",
"version": "1.2.1",
"description": "socket.io parser based on msgpack",
"main": "dist/index.cjs",
"module": "dist/index.module.js",
Expand All @@ -11,8 +11,8 @@
"lodash": "4.17.21"
},
"scripts": {
"build": "rimraf dist && rollup -c --bundleConfigAsCjs",
"watch": "rollup -c -w --bundleConfigAsCjs",
"build": "rimraf dist && rollup -c",
"watch": "rollup -c -w",
"prepare": "npm run build",
"test": "mocha --bail test/index.js",
"coverage": "nyc mocha test && open coverage/lcov-report/index.html"
Expand All @@ -31,8 +31,7 @@
},
"homepage": "https://github.com/skgdev/socket.io-msgpack-javascript#readme",
"files": [
"index.js",
"/src"
"dist"
],
"devDependencies": {
"@babel/core": "7.21.0",
Expand Down
4 changes: 3 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import babel from '@rollup/plugin-babel';
import commonjs from '@rollup/plugin-commonjs';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import pkg from './package.json';
import { readFileSync } from 'fs';

const pkg = JSON.parse(readFileSync('package.json', { encoding: 'utf8' }));

export default {
input: './index.js',
Expand Down

0 comments on commit c421cfc

Please sign in to comment.