mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-16 11:57:57 +01:00
959a732999
Remove toolkit init
50 lines
975 B
JavaScript
50 lines
975 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',
|
|
},
|
|
},
|
|
optimization: {
|
|
usedExports: true,
|
|
},
|
|
entry: {
|
|
mindplot: './src/index.js',
|
|
loader: './src/indexLoader.js',
|
|
},
|
|
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()],
|
|
};
|