wisemapping-frontend/packages/mindplot/webpack.common.js
Gonzalo Martinez 2370faea62 Merged in mindplot-webcomponent (pull request #57)
Mindplot webcomponent

* styles in js file

* editor now uses bootstrap widget manager

* fix console error: preventDefault on pasive events

* Mode as webcomponent parámeter. Rename of init method

* fix merge

* Mindplot webcomponent documentation

* fix

* remove comments

* delete comments

* Merged in Alejandro-Raiczyk/just-details-1661445571189 (pull request #56)

just details

Approved-by: Paulo Veiga
2022-08-26 01:35:59 +00:00

52 lines
1019 B
JavaScript

const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = {
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
library: {
type: 'umd',
},
},
entry: {
mindplot: './src/index.ts',
loader: './src/indexLoader.ts',
},
stats: {
errorDetails: true,
},
mode: 'production',
devtool: 'source-map',
module: {
rules: [
{
test: /.(js$)/,
use: ['babel-loader'],
exclude: [/node_modules/],
enforce: 'pre',
},
{
test: /\.(ts)$/,
use: 'ts-loader',
exclude: '/node_modules/',
},
{
test: /\.(png|svg)$/i,
type: 'asset/inline',
},
{
test: /\.css$/,
loader: 'css-loader',
},
],
},
resolve: {
alias: {
'@libraries': path.resolve(__dirname, '../../libraries/'),
},
extensions: ['.js', '.ts', '.json'],
},
plugins: [new CleanWebpackPlugin()],
};