Update build
parent
65969039a4
commit
becdbb870e
|
@ -1,10 +1,17 @@
|
|||
import consts from '@nickkaramoff/rollup-plugin-consts';
|
||||
import license from 'rollup-plugin-license';
|
||||
import postcss from 'rollup-plugin-postcss';
|
||||
import postcssPluginBanner from 'postcss-banner';
|
||||
import postcssPluginCalc from 'postcss-calc';
|
||||
import postcssPluginCssnano from 'cssnano';
|
||||
import postcssPluginMixins from 'postcss-mixins';
|
||||
import postcssPluginVariables from 'postcss-css-variables';
|
||||
import strip from '@rollup/plugin-strip';
|
||||
import { terser } from 'rollup-plugin-terser';
|
||||
|
||||
import { urlBuilderMap } from './src/networks';
|
||||
import networksMixin from './src/networksMixin';
|
||||
|
||||
const isDev = process.env.ROLLUP_WATCH || process.env.NODE_ENV === 'development';
|
||||
|
||||
const pkg = require('./package.json');
|
||||
|
@ -19,6 +26,9 @@ const bannerText = `${pkg.name} v${pkg.version} by Nikita Karamov\n${pkg.homepag
|
|||
* @type {Plugin[]}
|
||||
*/
|
||||
const plugins = [
|
||||
consts({
|
||||
urlBuilderMap,
|
||||
}),
|
||||
];
|
||||
|
||||
if (!isDev) {
|
||||
|
@ -40,6 +50,13 @@ if (!isDev) {
|
|||
plugins.push(postcss({
|
||||
extract: `${pkg.name}.min.css`,
|
||||
plugins: [
|
||||
postcssPluginMixins({
|
||||
mixins: {
|
||||
networks: networksMixin,
|
||||
},
|
||||
}),
|
||||
postcssPluginVariables(),
|
||||
postcssPluginCalc(),
|
||||
(!isDev) && postcssPluginCssnano({
|
||||
preset: 'default',
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue