0.1.2 • Published 5 years ago

@intrnl/rollup-plugin-include v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

rollup-plugin-include

Include chunks or assets within your Rollup bundle

Usage

npm install --save-dev @intrnl/rollup-plugin-include
# pnpm install --save-dev @intrnl/rollup-plugin-include
# yarn add --dev @intrnl/rollup-plugin-include
// rollup.config.js
import { include as includePlugin } from '@intrnl/rollup-plugin-include';

export default {
  input: 'src/index.js',
  plugins: [
    includePlugin(),
  ],
};
// Reference any file and it will be included within your Rollup bundle
let image_src = new URL('./assets/image.png', import.meta.url);

// Any files ending with .js will be picked up as a chunk by default,
// making it usable as a module worker.
let worker_src = new URL('./worker.js', import.meta.url);