wisemapping-frontend/packages/mindplot/webpack.common.js
Matias Arriola 80b5885a61 Merged in feature/bundle-assets (pull request #15)
Bundle assets to mindplot

* Make icons part of the bundle
Remove "legacy" icons

* Move images used in code to bundle

* Remove dependencies to colorPalette.{css,html}


Approved-by: Paulo Veiga
2021-12-22 00:23:18 +00:00

39 lines
745 B
JavaScript

const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = {
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
publicPath: '',
library: {
type: 'umd',
},
},
optimization: {
usedExports: true,
},
module: {
rules: [
{
use: ['babel-loader'],
test: /.(js$)/,
exclude: [
/node_modules/,
],
},
{
test: /\.(png|svg|jpg|jpeg|gif)$/i,
type: 'asset/resource',
},
],
},
resolve: {
alias: {
'@libraries': path.resolve(__dirname, '../../libraries/'),
},
extensions: ['.js', '.json'],
},
plugins: [new CleanWebpackPlugin()],
};