wisemapping-frontend/packages/core-js/webpack.common.js

36 lines
920 B
JavaScript
Raw Normal View History

2021-10-03 04:52:56 +02:00
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
2021-07-16 16:41:58 +02:00
module.exports = {
entry: './src/core.js',
2021-07-16 16:41:58 +02:00
output: {
path: path.resolve(__dirname, 'dist'),
2021-07-16 16:41:58 +02:00
filename: 'core.js',
publicPath: '',
library: {
type: 'umd',
},
2021-07-16 16:41:58 +02:00
},
2021-10-03 05:29:24 +02:00
target: 'web',
2021-07-16 16:41:58 +02:00
module: {
rules: [
{
use: 'babel-loader',
2021-10-03 04:52:56 +02:00
test: /.js$/,
exclude: [
/node_modules/,
path.resolve(__dirname, '../../libraries/mootools-core-1.4.5'),
path.resolve(__dirname, '../../libraries/underscore-min'),
]
},
2021-07-16 16:41:58 +02:00
],
},
resolve: {
alias: {
'@libraries': path.resolve(__dirname, '../../libraries/'),
},
2021-10-03 04:52:56 +02:00
extensions: ['.js'],
2021-07-16 16:41:58 +02:00
},
plugins: [new CleanWebpackPlugin()],
};