Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const path = require('path')
const webpack = require('webpack')
const { plugins, rules, loaders } = require('webpack-atoms')
let [externals] = process.argv.slice(2)
const dirname = process.cwd()
let { name } = require(`${dirname}/package.json`)
const compiler = webpack({
// mode: 'production',
// optimization: {
// minimize: false,
// },
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',
module.exports = function (config) {
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,
}),