Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import replace from 'rollup-plugin-replace'
import { uglify } from 'rollup-plugin-uglify'
import { terser } from 'rollup-plugin-terser'
import { getIfUtils, removeEmpty } from 'webpack-config-utils'
import { peerDependencies } from '../package.json'
/**
* @typedef {import('./types').RollupConfig} Config
*/
/**
* @typedef {import('./types').RollupPlugin} Plugin
*/
const env = process.env.NODE_ENV || 'development'
const { ifProduction } = getIfUtils(env)
const ROOT = resolve(__dirname, '..')
const DIST = resolve(ROOT, 'dist') //
/**
* Object literals are open-ended for js checking, so we need to be explicit
* @type {{entry:{esm2015: string, cjs: string},bundles:string}}
*/
const PATHS = {
entry: {
cjs: resolve(DIST, 'cjs'),
esm2015: resolve(DIST, 'esm2015'),
},
bundles: resolve(DIST, 'bundles'),
}
module.exports = function(env) {
var { ifProduction, ifNotProduction } = getIfUtils(env);
return {
devtool: ifProduction('source-map', 'eval'),
entry: {
main: './index.js',
vendor: [
'react',
'react-dom',
'react-router'
]
},
output: {
filename: ifProduction(
'bundle.[name].[chunkhash].js',
'bundle.[name].js'
),
module.exports = function(env) {
var { ifProduction, ifNotProduction } = getIfUtils(env);
return {
devtool: ifProduction('source-map', 'eval'),
entry: {
main: './index.js',
vendor: [
'react',
'react-dom',
'react-router'
]
},
output: {
filename: ifProduction(
'bundle.[name].[chunkhash].js',
'bundle.[name].js'
),
module.exports = function(env) {
var { ifProduction, ifNotProduction } = getIfUtils(env);
return {
devtool: ifProduction('source-map', 'eval'),
entry: {
main: './index.js',
vendor: [
'react',
'react-dom',
'react-router'
],
material: [
'material-ui',
'material-ui/svg-icons',
'material-ui/svg-icons/content/add',
'material-ui/List',
'material-ui/svg-icons/navigation/more-vert',
module.exports = function(env) {
var { ifProduction, ifNotProduction } = getIfUtils(env);
return {
devtool: ifProduction('source-map', 'eval'),
entry: {
main: './index.js',
vendor: [
'react',
'react-dom',
'react-router'
]
},
output: {
filename: ifProduction(
'bundle.[name].[chunkhash].js',
'bundle.[name].js'
),
module.exports = function(env) {
var { ifProduction, ifNotProduction } = getIfUtils(env);
return {
devtool: ifProduction('source-map', 'eval'),
entry: {
main: './index.js',
vendor: [
'react',
'react-dom',
'react-router'
]
},
output: {
filename: ifProduction(
'bundle.[name].[chunkhash].js',
'bundle.[name].js'
),
export function getEntry(environment: string, publicPath: string): Entry {
const { ifDevelopment } = getIfUtils(environment);
const hmrPath = path.normalize(`/${publicPath}/__webpack_hmr`);
return {
main: removeEmpty([
require.resolve("@babel/polyfill"),
ifDevelopment(
`webpack-hot-middleware/client?path=${hmrPath}`,
undefined,
),
resolvePath("src/client/index.tsx"),
]),
}
}
import pkg from '../package.json'
const {
pascalCase,
normalizePackageName,
getOutputFileName,
} = require('./helpers')
/**
* @typedef {import('./types').RollupConfig} Config
*/
/**
* @typedef {import('./types').RollupPlugin} Plugin
*/
const env = process.env.NODE_ENV || 'development'
const { ifProduction } = getIfUtils(env)
const LIB_NAME = pascalCase(normalizePackageName(pkg.name))
const ROOT = resolve(__dirname, '..')
const DIST = resolve(ROOT, 'dist')
/**
* Object literals are open-ended for js checking, so we need to be explicit
* @type {{entry:{esm5: string, esm2015: string},bundles:string}}
*/
const PATHS = {
entry: {
esm5: resolve(DIST, 'esm5'),
esm2015: resolve(DIST, 'esm2015'),
},
bundles: resolve(DIST, 'bundles'),
}
import pkg from '../package.json'
const {
pascalCase,
normalizePackageName,
getOutputFileName,
} = require('./helpers')
/**
* @typedef {import('./types').RollupConfig} Config
*/
/**
* @typedef {import('./types').RollupPlugin} Plugin
*/
const env = process.env.NODE_ENV || 'development'
const { ifProduction } = getIfUtils(env)
const LIB_NAME = pascalCase(normalizePackageName(pkg.name))
const ROOT = resolve(__dirname, '..')
const DIST = resolve(ROOT, 'dist')
/**
* @type {{entry:{esm5: string, esm2015: string},bundles:string}}
*/
const PATHS = {
entry: {
esm5: resolve(DIST, 'esm5'),
esm2015: resolve(DIST, 'esm2015'),
},
bundles: resolve(DIST, 'bundles'),
}
import pkg from '../package.json'
const {
pascalCase,
normalizePackageName,
getOutputFileName,
} = require('./helpers')
/**
* @typedef {import('./types').RollupConfig} Config
*/
/**
* @typedef {import('./types').RollupPlugin} Plugin
*/
const env = process.env.NODE_ENV || 'development'
const { ifProduction } = getIfUtils(env)
const LIB_NAME = pascalCase(normalizePackageName(pkg.name))
const ROOT = resolve(__dirname, '..')
const DIST = resolve(ROOT, 'dist')
/**
* Object literals are open-ended for js checking, so we need to be explicit
* @type {{entry:{esm5: string, esm2015: string},bundles:string}}
*/
const PATHS = {
entry: {
esm5: resolve(DIST, 'esm5'),
esm2015: resolve(DIST, 'esm2015'),
},
bundles: resolve(DIST, 'bundles'),
}