
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
rollup-plugin-paths
Advanced tools
Let you use the same variables at different directory, like this:
|-- entry.js
|-- main.js
|-- pages/
|-- about.js
|-- src/
|-- lib/
|-- foo/
|-- one.js
|-- two.js
|-- vendors/
|-- jquery.js
main.js
// from src/lib/foo/one.js
import { One } from 'foo@one.js'
// from src/lib/foo/two.js
import { Two } from 'two'
// from vendors/jquery.js
import 'jquery'
pages/about.js
// from src/lib/foo/one.js
import { One } from 'foo@one.js';
// from vendors/jquery.js
import 'jquery'
$ npm install --save-dev rollup-plugin-paths
// rollup.config.js
import resolve from 'rollup-plugin-paths'
export default {
entry: 'entry.js',
dest: 'bundle.js',
plugins: [
resolve({
// Define a directory width suffix `@`
"foo@": "./src/lib/foo/",
// Define a path
"jquery": "./vendors/jquery.js",
// Define a path width a defined directory
"two": "foo@two.js"
})
]
}
./vendors/jquery is wrong, please do it like this ./vendors/jquery.jsfoo@goo@one.js is wrongMIT
FAQs
Let you use the same variables at different directory.
We found that rollup-plugin-paths demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.