mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 14:47:56 +01:00
80b5885a61
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
39 lines
745 B
JavaScript
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()],
|
|
};
|