wisemapping-frontend/webpack.common.js
2023-02-10 02:51:52 +00:00

42 lines
995 B
JavaScript

/** @type {import('webpack').Configuration} */
module.exports = {
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
},
optimization: {
usedExports: true,
},
stats: {
errorDetails: true,
},
devtool: 'source-map',
module: {
rules: [
{
test: /\.(tsx|ts)?$/,
use: {
loader: "ts-loader",
options: {
allowTsInNodeModules: true,
},
},
exclude: '/node_modules/',
},
{
test: /\.(png|jpe?g|gif|svg)$/,
type: 'asset/inline',
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ['babel-loader'],
},
{
test: /\.css$/,
use: ["style-loader", "css-loader"],
}
],
},
};