X-Git-Url: https://git.r.bdr.sh/rbdr/serpentity/blobdiff_plain/3828c5670e97df8514e3dad23b3890e8d8939669..62bc93dd77eacab028c45f831e0746f64de8dd46:/config/webpack.cjs?ds=inline diff --git a/config/webpack.cjs b/config/webpack.cjs new file mode 100644 index 0000000..a36c166 --- /dev/null +++ b/config/webpack.cjs @@ -0,0 +1,40 @@ +const Path = require('path'); + +module.exports = { + entry: { + serpentity: './lib/serpentity.js', + 'serpentity.min': './lib/serpentity.js' + }, + + output: { + path: Path.resolve(__dirname, '../dist'), + filename: '[name].js', + library: 'Serpentity', + libraryTarget: 'umd' + }, + + module: { + rules: [ + { + test: /\.js$/, + exclude: /(node_modules|doc)/, + use: 'babel-loader' + } + ] + }, + + resolve: { + modules: [ + 'node_modules', + Path.resolve(__dirname, '../lib') + ], + + extensions: ['.js'] + }, + + context: Path.resolve(__dirname, '..'), + + optimization: { + minimize: true + } +};