Socket
Socket
Sign inDemoInstall

babel-plugin-webpack-prefetch

Package Overview
Dependencies
56
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-plugin-webpack-prefetch

babel plugin for adding webpackPrefetch comment


Version published
Maintainers
1
Install size
532 kB
Created

Changelog

Source

1.1.0 (2018-04-24)

Features

  • add support for babel 6 (53f2ea5)

<a name="1.0.0"></a>

Readme

Source

babel-plugin-webpack-prefetch

Babel plugin for adding webpackPrefetch comment.

license npm Build Status codecov Conventional Commits

Usage

yarn add -D babel-plugin-webpack-prefetch

then add babel-plugin-webpack-prefetch to your .babelrc

{
  "plugins": [
+    "babel-plugin-webpack-prefetch"
  ]
}

And it does :

import ccc from 'ddd'
import 'aaa'

const a = import(
+ /* webpackPrefetch: true */
'aaa'
)
const b = import(
+ /* webpackPrefetch: true */
'bbb'
)

babel-plugin-webpack-prefetch will respect your comment :

const a = import(
// you added webpackPrefetch: false so babel-plugin-webpack-prefetch will not modify it
/* webpackPrefetch: false */
'aaa'
)
const b = import(
+ /* webpackPrefetch: true */
'bbb'
)

Keywords

FAQs

Last updated on 25 Apr 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc