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

42 lines
851 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-01-30 11:37:14 +01:00
publicPath: '',
2022-01-25 19:10:40 +01:00
library: {
type: 'umd',
2022-01-30 11:37:14 +01:00
}, },
stats:{
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: {
extensions: ['.ts', '.tsx', '.js', '.jsx']
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: '/node_modules/'
},
{
2022-02-08 03:48:29 +01:00
test: /\.(png|jpe?g|gif|svg)$/,
2022-01-25 19:10:40 +01:00
type: 'asset/inline',
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ['babel-loader'],
},
],
},
}