wisemapping-frontend/packages/mindplot/webpack.common.js
Paulo Gustavo Veiga cdd044c41d Add center position action.
Improve screenmanager positioning
Change several clasess to typescript
2022-01-09 18:53:43 -08:00

47 lines
929 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.js',
loader: './src/indexLoader.ts',
},
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',
},
],
},
resolve: {
alias: {
'@libraries': path.resolve(__dirname, '../../libraries/'),
},
extensions: ['.js', '.ts', '.json'],
},
plugins: [new CleanWebpackPlugin()],
};