systemjs/rollup.config.js
2018-08-19 17:55:46 +02:00

24 lines
504 B
JavaScript

import replace from 'rollup-plugin-replace';
import fs from 'fs';
const version = JSON.parse(fs.readFileSync('package.json')).version;
const name = process.env.sjs ? 's' : 'system';
export default {
input: `src/${name}.js`,
output: {
format: 'iife',
strict: false,
file: `dist/${name}.js`,
banner: process.env.sjs ? `/*
* SJS ${version}
* Minimal SystemJS Build
*/` : `/*
* SystemJS ${version}
*/`
},
plugins: [replace({
TRACING: process.env.sjs ? 'false' : 'true'
})]
};