This repository was archived by the owner on Aug 4, 2021. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork18
This module has moved and is now available at @rollup/plugin-inject /https://github.com/rollup/plugins/blob/master/packages/inject
NotificationsYou must be signed in to change notification settings
rollup/rollup-plugin-inject
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This module has moved and is now available at@rollup/plugin-inject. Please update your dependencies. This repository is no longer maintained.
Scan modules for global variables and injectimport statements where necessary
npm install --save-dev rollup-plugin-inject
import{rollup}from'rollup';importinjectfrom'rollup-plugin-inject';rollup({entry:'main.js',plugins:[inject({// control which files this plugin applies to// with include/excludeinclude:'**/*.js',exclude:'node_modules/**',/* all other options are treated as modules...*/// use the default – i.e. insert// import $ from 'jquery'$:'jquery',// use a named export – i.e. insert// import { Promise } from 'es6-promise'Promise:['es6-promise','Promise'],// use a namespace import – i.e. insert// import * as fs from 'fs'fs:['fs','*'],// use a local module instead of a third-party one'Object.assign':path.resolve('src/helpers/object-assign.js'),/* ...but if you want to be careful about separating modules from other options, supply `options.modules` instead */modules:{$:'jquery',Promise:['es6-promise','Promise'],'Object.assign':path.resolve('src/helpers/object-assign.js')}})]}).then(...)
About
This module has moved and is now available at @rollup/plugin-inject /https://github.com/rollup/plugins/blob/master/packages/inject
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors11
Uh oh!
There was an error while loading.Please reload this page.