Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
root: 'React',
commonjs: 'react',
commonjs2: 'react',
amd: 'react'
},
'react-dom': {
root: 'ReactDOM',
commonjs: 'react-dom',
commonjs2: 'react-dom',
amd: 'react-dom',
},
},
plugins: [
plugins.define(),
// plugins.uglify(),
plugins.banner({
banner: '(c) 2014 - present: Jason Quense | https://github.com/jquense/react-widgets/blob/master/LICENSE.md',
entryOnly : true
}),
],
node: {
Buffer: false,
fs: 'empty',
net: 'empty',
tls: 'empty',
},
}
entry:
`${loaders.imports().loader}?` +
`module=${path.join(dirname, 'localizer.js')}` +
`!${require.resolve('./shim.js')}`,
output: {
path: path.join(dirname, './dist'),
filename: name + '.js',
libraryTarget: 'var',
},
module: {
rules: [rules.js({ envName: 'esm' })],
},
plugins: [
plugins.define(),
plugins.banner({
banner:
'(c) 2014 - present: Jason Quense | https://github.com/jquense/react-widgets/blob/master/LICENSE.md',
entryOnly: true,
}),
],
externals: {
react: 'window.React',
'react-widgets/lib/configure': 'window.ReactWidgets',
...JSON.parse(externals || '{}'),
},
node: {
Buffer: false,
},
})
compiler.run((err, stats) => {
return merge({}, config, {
devtool: 'source-map',
entry: `${loaders.imports().loader}?` +
`module=${path.resolve(process.cwd(), config.entry)}` +
`!${require.resolve('./shim.js')}`,
output: {
libraryTarget: 'var'
},
module: {
rules: [
rules.js()
]
},
plugins: [
plugins.define(),
plugins.banner({
banner:'(c) 2014 - present: Jason Quense | https://github.com/jquense/react-widgets/blob/master/LICENSE.md',
entryOnly : true,
}),
],
externals: {
'react': 'window.React',
'react-widgets/lib/configure': 'window.ReactWidgets',
},
node: {
Buffer: false
},
})
}