mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-12-23 04:03:47 +01:00
2370faea62
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
74 lines
1.4 KiB
JavaScript
74 lines
1.4 KiB
JavaScript
/* eslint-disable no-undef */
|
|
const path = require('path');
|
|
const webpack = require('webpack');
|
|
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
|
|
webpack;
|
|
|
|
module.exports = {
|
|
entry: {
|
|
app: path.join(__dirname, 'src', 'index.tsx'),
|
|
},
|
|
target: 'web',
|
|
resolve: {
|
|
extensions: ['.ts', '.tsx', '.js', '.jsx'],
|
|
},
|
|
output: {
|
|
filename: '[name].bundle.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: 'ts-loader',
|
|
exclude: '/node_modules/',
|
|
},
|
|
{
|
|
test: /\.(png|jpe?g|gif|svg)$/,
|
|
type: 'asset/inline',
|
|
},
|
|
{
|
|
test: /\.wxml$/i,
|
|
type: 'asset/source',
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
loader: 'css-loader',
|
|
},
|
|
],
|
|
},
|
|
optimization: {
|
|
usedExports: true,
|
|
chunkIds: 'named',
|
|
splitChunks: {
|
|
cacheGroups: {
|
|
vendors: {
|
|
test: /node_modules\/.*/,
|
|
name: 'vendors',
|
|
chunks: 'all',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
plugins: [
|
|
new CleanWebpackPlugin({
|
|
dangerouslyAllowCleanPatternsOutsideProject: true,
|
|
dry: false,
|
|
}),
|
|
new CopyWebpackPlugin({
|
|
patterns: [
|
|
{
|
|
from: 'public/*',
|
|
to: '[name].[ext]',
|
|
globOptions: {
|
|
ignore: ['**/index.html'],
|
|
},
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
};
|