Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

perf-marks

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

perf-marks - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

12

CHANGELOG.md

@@ -10,2 +10,8 @@ # Change Log

## [1.4.1][] - 2019-10-26
### Updated
- Adding docs for bundle optimization and how to use different bundles in web apps
## [1.4.0][] - 2019-10-26

@@ -123,5 +129,7 @@

[1.3.1]: https://github.com/willmendesneto/perf-marks/tree/v1.3.1
[unreleased]: https://github.com/willmendesneto/perf-marks/compare/v1.4.0...HEAD
[1.4.0]: https://github.com/willmendesneto/perf-marks/tree/v1.4.0
[Unreleased]: https://github.com/willmendesneto/perf-marks/compare/v1.4.0...HEAD
[1.4.0]: https://github.com/willmendesneto/perf-marks/tree/v1.4.0
[Unreleased]: https://github.com/willmendesneto/perf-marks/compare/v1.4.1...HEAD
[1.4.1]: https://github.com/willmendesneto/perf-marks/tree/v1.4.1

2

package.json
{
"name": "perf-marks",
"version": "1.4.0",
"version": "1.4.1",
"author": "Will Mendes <willmendesneto@gmail.com>",

@@ -5,0 +5,0 @@ "description": "The simplest and lightweight solution for User Timing API in Javascript.",

@@ -206,2 +206,63 @@ # Perf-marks

If you need optimize your bundle size even more, this package provides different bundles for `CommonJS`, `UMD`, `ESM` and `ES2015`. To make the dev experience smoothiest as possible, you can use `babel-plugin-transform-imports` in your app and configure the bundle that fits the most for your app!
```bash
yarn add -D babel-plugin-transform-imports
# or
npm install --save-dev babel-plugin-transform-imports
```
Create a `.babelrc.js` file in the root directory of your project:
```js
const plugins = [
[
'babel-plugin-transform-imports',
{
'perf-marks/perf-marks': {
// Use "transform: 'perf-marks/perf-marks/${member}'," if your bundler does not support ES modules
transform: 'perf-marks/dist/esm/${member}',
preventFullImport: true,
},
'perf-marks/entries': {
// Use "transform: 'perf-marks/entries/${member}'," if your bundler does not support ES modules
transform: 'perf-marks/entries/esm/${member}',
preventFullImport: true,
},
},
],
];
module.exports = { plugins };
```
Or just use it via `babel-plugin-import`
```bash
yarn add -D babel-plugin-import
# or
npm install --save-dev babel-plugin-import
```
Create a `.babelrc.js` file in the root directory of your project:
```js
const plugins = [
[
'babel-plugin-import',
{
libraryName: 'perf-marks/entries',
// Use "'libraryDirectory': ''," if your bundler does not support ES modules
libraryDirectory: 'esm',
camel2DashComponentName: false,
},
'entries',
],
];
module.exports = { plugins };
```
And enjoy! Yeah, it's simple like that 😉
## Publish

@@ -208,0 +269,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc