Skip to content

Commit

Permalink
feat: add postcss-url to compile svg to inline
Browse files Browse the repository at this point in the history
  • Loading branch information
RaoHai committed Nov 1, 2019
1 parent 399bc34 commit 87b7cf7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"enzyme-adapter-react-16": "^1.13.2",
"gh-pages": "^1.2.0",
"less": "^3.9.0",
"postcss-url": "^8.0.0",
"raw-loader": "^3.1.0",
"react": "^16.4.1",
"react-dom": "^16.4.1",
Expand Down
5 changes: 5 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import external from 'rollup-plugin-peer-deps-external'
import less from 'less'
import postcss from 'rollup-plugin-postcss'
import resolve from 'rollup-plugin-node-resolve'
import postcssUrl from 'postcss-url'

import url from 'rollup-plugin-url'
import svgr from '@svgr/rollup'

Expand Down Expand Up @@ -61,6 +63,9 @@ export default {
postcss({
modules: true,
process: processLess,
plugins: [
postcssUrl({ url: 'inline'})
]
}),
url(),
svgr(),
Expand Down

0 comments on commit 87b7cf7

Please sign in to comment.