Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// build service
var serviceEntry = {};
serviceEntry[entryName + '.service'] = serviceEntry[entryName + '.service.min'] = main;
dist(getConfig(
serviceEntry,
{
path: `./${dirname}/${packageName}/dist/`,
filename: '[name].js',
pathinfo: false,
},
{
externalBuiltinModules: true,
builtinModules: Object.assign({
mobx: ['mobx'],
redux: ['redux']
}, RaxPlugin.BuiltinModules),
moduleName: packageName,
globalName: globalName,
version: packagesJson.version,
},
babelOptions, null, null, true
)).catch(function(err) {
setTimeout(function() {
throw err;
});
});
}
var entryName = packageName.split('-')[1];
var globalName = normalizeGlobalName(packageName);
var entry = {};
entry[entryName] = entry[entryName + '.min'] = entry[entryName + '.factory'] = main;
dist(getConfig(
entry,
{
path: './packages/' + packageName + '/dist/',
filename: '[name].js',
sourceMapFilename: '[name].map',
pathinfo: false,
},
{
externalBuiltinModules: true,
builtinModules: RaxPlugin.BuiltinModules,
moduleName: packageName,
globalName: globalName,
},
babelOptions
));
});
var entryName = packageName.split('-')[1];
var globalName = normalizeGlobalName(packageName);
var entry = {};
entry[entryName] = entry[entryName + '.min'] = entry[entryName + '.factory'] = main;
dist(getConfig(
entry,
{
path: './packages/' + packageName + '/dist/',
filename: '[name].js',
sourceMapFilename: '[name].map',
pathinfo: false,
},
{
externalBuiltinModules: true,
builtinModules: RaxPlugin.BuiltinModules,
moduleName: packageName,
globalName: globalName,
},
{
presets: ['es2015', 'rax']
}
));
});
}
var webpackConfigProd = getConfig(
entry,
{
path: path.resolve(process.cwd(), 'dist'),
filename: '[name].js',
sourceMapFilename: '[name].map',
pathinfo: false,
},
{
externalBuiltinModules: true,
builtinModules: Object.assign({
mobx: ['mobx'],
redux: ['redux']
}, RaxPlugin.BuiltinModules),
moduleName: packageName,
globalName: globalName,
},
babelOptions
);
module.exports = webpackConfigProd;
}
var webpackConfigProd = getConfig(
entry,
{
path: path.resolve(process.cwd(), 'dist'),
filename: '[name].js',
sourceMapFilename: '[name].map',
pathinfo: false,
},
{
externalBuiltinModules: true,
builtinModules: Object.assign({
mobx: ['mobx'],
redux: ['redux']
}, RaxPlugin.BuiltinModules),
moduleName: packageName,
globalName: globalName,
},
babelOptions
);
module.exports = webpackConfigProd;
var entry = {};
entry[entryName] = entry[entryName + '.min'] = entry[entryName + '.factory'] = main;
dist(getConfig(
entry,
{
path: `./${PACKAGES_NAME}/${packageName}/dist/`,
filename: '[name].js',
sourceMapFilename: '[name].map',
pathinfo: false,
},
{
externalBuiltinModules: true,
builtinModules: Object.assign({
mobx: ['mobx'],
redux: ['redux']
}, RaxPlugin.BuiltinModules),
moduleName: packageName,
globalName: globalName,
},
babelOptions
)).catch(function(err) {
setTimeout(function() {
throw err;
});
});
});