1.0.3 • Published 3 years ago

vue-inline-px-to-rem v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

vue-inline-px-to-rem

a webpack loader for vue projects to transform px units exiting in inline styles to rem units

Getting Started

Using npm to install vue-inline-px-to-rem

npm install --save-dev vue-inline-px-to-rem

Add the loader to your webpack config. For example:

vue.config.js

module.exports = {
  chainWebpack (config) {
    ...
    config.module
      .rule('vue')
      .test(/\.vue$/)
      .use('vue-inline-px-to-rem')
      .loader('vue-inline-px-to-rem')
      .options({
        rootValue: 100
      })
      .end()
      ...
  }
}

Options

NameTypeDefaultDescription
rootValueNumber100Represents the root element font size or returns the root element font size based on the input parameter

More

to-do-list

  • add unit testing
  • add ignore-line or ignore-page feature
1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago