wisemapping-frontend/packages/editor/webpack.common.js

50 lines
931 B
JavaScript
Raw Normal View History

2022-01-25 19:10:40 +01:00
const path = require('path');
module.exports = {
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
2022-02-21 06:25:18 +01:00
publicPath: '',
2022-01-25 19:10:40 +01:00
library: {
type: 'umd',
2022-02-21 06:25:18 +01:00
},
},
stats: {
2022-07-13 03:58:11 +02:00
errorDetails: true,
2022-11-12 16:17:06 +01:00
}, entry: {
2022-07-13 03:58:11 +02:00
'editor.bundle': path.join(__dirname, 'src', 'index.tsx'),
2022-01-25 19:10:40 +01:00
},
mode: 'development',
devtool: 'source-map',
target: 'web',
resolve: {
2022-07-13 03:58:11 +02:00
extensions: ['.ts', '.tsx', '.js', '.jsx'],
2022-01-25 19:10:40 +01:00
},
module: {
2022-02-21 06:25:18 +01:00
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
2022-07-13 03:58:11 +02:00
exclude: '/node_modules/',
2022-02-21 06:25:18 +01:00
},
{
test: /\.(png|jpe?g|gif|svg)$/,
type: 'asset/inline',
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ['babel-loader'],
2022-07-13 03:58:11 +02:00
},
{
2022-02-21 06:25:18 +01:00
test: /\.css$/i,
2022-07-13 03:58:11 +02:00
loader: 'style-loader',
2022-02-21 06:25:18 +01:00
},
{
test: /\.css$/,
loader: 'css-loader',
2022-07-13 03:58:11 +02:00
},
2022-02-21 06:25:18 +01:00
],
2022-01-25 19:10:40 +01:00
},
2022-02-21 06:25:18 +01:00
};