@agm-as/components
v2.1.4
Published
agm services components
Downloads
96
Readme
@agm-as/components
Provides reusable components for services.
npm install @agm-as/components
Publishing
Update the version
in package.json
according to the best practices of semantic versioning, and commit (the version change) as :bookmark: Update components version
, then run npm publish
to realise the changes.
Setup
Detailed per project setup requirements.
Next.js
Provided components needs to be transpiled in order to work. See example next.config.js
:
const withTm = require('next-transpile-modules')(['@agm-as/components']);
module.exports = withTm({...});
Babel
@agm-as/components
sometimes provide inline SVGs. In order to handle them properly we need the babel plugin inline-react-svg
. See example babel.config.js
:
module.exports = {
presets: ['next/babel'],
plugins: ['inline-react-svg']
};
PostCSS
The PostCSS plugin postcss-modules-values-replace
is required in order for styles to transpile properly. Example postcss.config.js
:
module.exports = {
plugins: [
require('postcss-modules-values-replace')({}),
require('postcss-preset-env')({stage: 0}),
require('cssnano')({zindex: false})
]
};