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