1.0.6 • Published 1 year ago

rollup-plugin-replace-style-inject v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

rollup-plugin-replace-style-inject

This plugin changes the path to style-inject and installs a built copy of it

Installation

# npm
npm install --save-dev rollup-plugin-replace-style-inject

# yarn
yarn add -D rollup-plugin-replace-style-inject

Usage

// rollup.config.js
import replaceStyleInject from 'rollup-plugin-replace-style-inject'

export default {
  input: 'src/index.js',
  output: {
    file: 'dist/app.js',
    format: 'cjs'
  },
  plugins: [
	replaceStyleInject()
  ]
}

Configuration

There are some useful options:

replaceValue

Your custom path to the file style-inject.es.js

Type: String

Default value: 'rollup-plugin-replace-style-inject/style-inject-custom/style-inject.es.js'

replaceStyleInject({ replaceValue: 'your-file-path' })

regExp

Type: String

Default value: /.*(.scss.js)$/

Regular expression to find style files

replaceStyleInject({ regExp: '/.*(.scss.js)$/' })

Dependencies

Don't forget to specify the plugin as a dependency for your library

{
  "dependencies": {
    "rollup-plugin-replace-style-inject": "latest"
  }
}

License

MIT

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago