Created
October 1, 2018 11:07
-
-
Save romanlex/0bcd7aa71d498c03a2bf4d5511c1e687 to your computer and use it in GitHub Desktop.
Rollup config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sass from 'rollup-plugin-sass' | |
import webworkify from 'rollup-plugin-webworkify' | |
import bundleWorker from 'rollup-plugin-bundle-worker' | |
import autoprefixer from 'autoprefixer' | |
import alias from 'rollup-plugin-alias' | |
import babel from 'rollup-plugin-babel' | |
import cjs from 'rollup-plugin-commonjs' | |
import cssurl from 'postcss-url' | |
import env from 'postcss-preset-env' | |
import json from 'rollup-plugin-json' | |
import postcss from 'rollup-plugin-postcss' | |
import resolve from 'rollup-plugin-node-resolve' | |
import scss from 'rollup-plugin-scss' | |
const aliases = require('./aliases') | |
export default { | |
input: 'src/index.js', | |
cache: true, | |
external: ['react', 'react-dom', 'prop-types', 'classnames'], | |
output: { | |
file: 'bundle.js', | |
format: 'umd', | |
}, | |
plugins: [ | |
json(), | |
postcss({ | |
modules: true, | |
extract: true, | |
namedExports: true, | |
plugins: [ | |
cssurl({ | |
url: 'inline', | |
}), | |
env(), | |
autoprefixer(), | |
], | |
}), | |
alias(aliases), | |
bundleWorker(), | |
babel({ | |
exclude: 'node_modules/**', | |
}), | |
cjs(), | |
sass(), | |
resolve({ | |
extensions: ['.scss', '.sass'], | |
}), | |
scss(), | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
você consegue extrair o css em um arquivo separado?