0.2.4 • Published 4 years ago

rollup-plugin-includepaths v0.2.4

Weekly downloads
12,692
License
MIT
Repository
github
Last release
4 years ago

rollup-plugin-includepaths

Let you use relative paths in your import directives, like this:

// from src/lib/one/foo.js
import { Foo } from 'one/foo';

// from src/other/two/bar.js
import { Bar } from 'two/bar';

Setup

In your rollup configuration file:

import includePaths from 'rollup-plugin-includepaths';

let includePathOptions = {
    include: {},
    paths: ['src/lib', 'src/other'],
    external: [],
    extensions: ['.js', '.json', '.html']
};

export default {
    entry: './app.js',
    format: 'cjs',
    dest: 'public/app.min.js',
    plugins: [ includePaths(includePathOptions) ],
};

Options:

paths = ['']

An array of source paths in your project where the plugin should look for files

Example: ['src/lib', 'src/foo']

By default, resolve files from working dir

include

A map of module=>path/to/file.js with custom module paths. Used to override the search with a static path (like Browserify does with the "browser" config).

Use this option if you want to skip the file resolution and directly resolve a module name to a given path.

Example:

include: {
    // Import example: import angular from 'angular';
    'angular': 'bower_components/angular/angular.js'
}

external

An array of module names that should be excluded from the bundle (external modules).

By default, all the node built-in modules will be marked as external.

To include the built-ins, you can use the builtins plugin and set this config to an empty array.

Example:

// will not include the module 'angular' in the final bundle
external: ['angular']

extensions

An array of file extensions to look for in the project.

Default: ['.js', '.json']

mindee-sdk-react@outwalk/sable@jleeson/toolchain-javascript@jleeson/toolchain-typescriptplanz-uikit-mjtinbox@infinitebrahmanuniverse/nolb-rollup-plugin-i@everything-registry/sub-chunk-2680@zxventures/courier-design-systempure-enginesibur-common-componentsrollup-dyc-demorollup-react-appreact-open-formtest-components-yxswdeember-cli-webcomponents-bundlerfiori-design-reactmayihr-login-componentsmayihr-business-componentsmayihr-componentsmayihr-components-mobilemayihr-ldcplarge-data-tableneocast_api_utilsmama-noodlemetalboxmarionette-animated-region-cssanimatormarionette-animated-region-jsanimatormarionette-animatormarionette-animator-cssplayermarionette-animator-jsplayergulp-build-tools-tsledellm-playground-chainhexo-plugin-rollupheremap-tsinstaller-basicjs-in-jsonjspicl-clinwt-gulpfilepagerender-ngplanz-uikitplanz-uikit-hja14-table@vimesh/portlet-plugin-vue@visual-framework/vf-demo-desing-system@visual-framework/vf-sass-compilation@hduy/pkgcourier-design-systemcui-nyscreate-mashup-app@diekoders/resources@hyperloop-upv/common-frontxstate-toolsbs-ad-builderbuild_rollup@groceristar/sd-wrapperb14-tableuiwiwidget@webreflection/hydravitrailtln-test-pkg@vitrail/plugin-typescriptyunxi-antd-tablewidjet-test-utilscodemo@quentin_widlocher/jspicl-cli@mdhnpm/react-mdh-blog-components@networkteam/gulpfile@nijor/cli@nys-cui/cui-cli@nys-cui/cui-nys@loriensleafs/dom@loriensleafs/marionette-animated-region@kzaytsev/common-components@redsift/redsift-bundler@taho2509/rock-common-ui@fabiog/ddatepicker@stromboli/plugin-rollup
0.2.4

4 years ago

0.2.3

6 years ago

0.2.2

7 years ago

0.1.8

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.7

7 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago