帆软决策平台数据连接界面库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

73 lines
2.4 KiB

const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const vars = require('postcss-simple-vars');
const autoprefixer = require('autoprefixer');
const dirs = require('./dirs');
module.exports = {
entry: {
show: ['@babel/polyfill', './src/i18n.ts', './src/index.ts'],
},
resolve: {
mainFields: ['module', 'main'],
extensions: ['.js', '.ts'],
alias: {
ui: dirs.UI,
src: dirs.SRC,
ReportCst: dirs.CONSTAINS,
'@core': dirs.CORE,
'@constants': dirs.CONST,
},
},
module: {
rules: [
{
test: /\.(js|ts)$/,
include: [dirs.SRC, dirs.FINESHEET, dirs.AXIOS, dirs.RESIZER, dirs.LOCAL_FINESHEET, dirs.NODE_MODULES],
use: [{
loader: 'babel-loader',
options: {
configFile: dirs.BABEL_CONFIG
},
}, {
loader: 'source-map-loader',
options: {
enforce: 'pre'
}
}]
},
{
test: /\.(css|less)$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
url: false
}
},
{
loader: 'postcss-loader',
options: {
plugins: [vars({
variables: {
fontUrl: '../node_modules/fineui/dist/font/',
fontReportUrl: '../assets/font',
imageUrl: '/webroot/decision/resources?path=/com/fr/web/resources/dist/images/1x',
image2xUrl: '/webroot/decision/resources?path=/com/fr/web/resources/dist/images/2x',
}
}), autoprefixer]
},
},
{
loader: 'less-loader',
options: {
relativeUrls: false
}
}
],
},
],
},
};