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

50 lines
921 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-01-30 11:37:14 +01:00
errorDetails: true
2022-01-25 19:10:40 +01:00
},
entry: {
"editor.bundle": path.join(__dirname, 'src', 'index.tsx')
},
mode: 'development',
devtool: 'source-map',
target: 'web',
resolve: {
2022-02-21 06:25:18 +01: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',
exclude: '/node_modules/'
},
{
test: /\.(png|jpe?g|gif|svg)$/,
type: 'asset/inline',
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ['babel-loader'],
}, {
test: /\.css$/i,
loader: 'style-loader'
},
{
test: /\.css$/,
loader: 'css-loader',
}
],
2022-01-25 19:10:40 +01:00
},
2022-02-21 06:25:18 +01:00
};