Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const extensionGlob = `**/*{${settings.extensions.join(',')}}*`;
const entryPath = join(settings.source_path, settings.source_entry_path);
const packPaths = sync(join(entryPath, extensionGlob));
const entry = packPaths.reduce((map, entryParam) => {
const localMap = map;
const namespace = relative(join(entryPath), dirname(entryParam));
localMap[
join(namespace, basename(entryParam, extname(entryParam)))
] = resolve(entryParam);
return localMap;
}, {});
const nodeLibsBrowser = require('node-libs-browser');
nodeLibsBrowser.assert = require.resolve('browser-assert');
nodeLibsBrowser.util = require.resolve('util');
module.exports = {
entry,
output: {
path: output.path,
publicPath: output.publicPath,
filename: '[name].[hash].js',
chunkFilename: '[name].[hash].js'
},
module: {
rules: sync(join(loadersDir, '*.js')).map(loader => require(loader))
},
plugins: [
new webpack.EnvironmentPlugin(JSON.parse(JSON.stringify(env))),
// entry points are required to work with webpacker (rails)
const entryPath = join(settings.source_path, settings.source_entry_path);
const packPaths = sync(join(entryPath, extensionGlob));
const entry = packPaths.reduce((map, entryParam) => {
const localMap = map;
const namespace = relative(join(entryPath), dirname(entryParam));
localMap[
join(namespace, basename(entryParam, extname(entryParam)))
] = resolve(entryParam);
return localMap;
}, {});
const nodeLibsBrowser = require('node-libs-browser');
nodeLibsBrowser.assert = require.resolve('browser-assert');
nodeLibsBrowser.util = require.resolve('util');
module.exports = {
entry,
output: {
path: output.path,
publicPath: output.publicPath,
filename: '[name].[hash].js',
chunkFilename: '[name].[hash].js'
},
module: {
rules: sync(join(loadersDir, '*.js')).map(loader => require(loader))
},
plugins: [
new webpack.EnvironmentPlugin(JSON.parse(JSON.stringify(env))),
// entry points are required to work with webpacker (rails)
new WebpackAssetsManifest({