66 Star 327 Fork 70

GVPrsuite / rsuite

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.karma.js 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
const webpack = require('webpack');
/**
* @type {import('webpack').Configuration}
*/
module.exports = {
output: {
pathinfo: true
},
mode: 'development',
resolve: {
extensions: ['.ts', '.tsx', '.js'],
alias: {
'@test': path.resolve(__dirname, './test'),
'@': path.resolve(__dirname, './src')
},
/**
* Polyfill Node.js util module which is used by sinon
*
* @see https://stackoverflow.com/a/64580815
*/
fallback: {
util: require.resolve('util/')
}
},
plugins: [
new webpack.DefinePlugin({
process: { env: { RUN_ENV: JSON.stringify(process.env.RUN_ENV) } }
})
],
module: {
rules: [
{
test: [/\.tsx?$/, /\.jsx?$/],
use: ['babel-loader?babelrc'],
exclude: /node_modules/
},
{
test: /\.(less|css)$/,
use: [
{
loader: 'style-loader' // creates style nodes from JS strings
},
{
loader: 'css-loader' // translates CSS into CommonJS
},
{
loader: 'less-loader', // compiles Less to CSS,
options: {
lessOptions: {
javascriptEnabled: true,
modifyVars: { '@enable-css-reset': false }
}
}
}
]
}
]
}
};
TypeScript
1
https://gitee.com/rsuite/rsuite.git
git@gitee.com:rsuite/rsuite.git
rsuite
rsuite
rsuite
main

搜索帮助