зеркало из https://github.com/microsoft/tsiclient.git
51 строка
1.2 KiB
JavaScript
51 строка
1.2 KiB
JavaScript
const path = require('path');
|
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
|
|
module.exports = {
|
|
entry: './src/TsiClient.ts',
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: [{
|
|
loader: 'ts-loader',
|
|
options: {
|
|
compilerOptions: {
|
|
declaration: false,
|
|
}
|
|
}
|
|
}],
|
|
exclude: /node_modules/
|
|
},
|
|
{
|
|
test: /\.(scss|css)$/,
|
|
use: [
|
|
{
|
|
loader: MiniCssExtractPlugin.loader
|
|
},
|
|
'css-loader',
|
|
'sass-loader'
|
|
]
|
|
},
|
|
{
|
|
test: /\.(png|jp(e*)g|svg)$/,
|
|
use: [{
|
|
loader: 'url-loader',
|
|
options: {
|
|
limit: 8000, // Convert images < 8kb to base64 strings
|
|
name: 'images/[hash]-[name].[ext]'
|
|
}
|
|
}]
|
|
}
|
|
]
|
|
},
|
|
resolve: {
|
|
extensions: [ '.tsx', '.ts', '.js' ]
|
|
},
|
|
output: {
|
|
filename: 'tsiclient.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
publicPath: '/dist/',
|
|
libraryTarget: 'umd'
|
|
},
|
|
}; |