快速搭建fineui开发环境。
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.

64 lines
1.7 KiB

const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const autoprefixer = require("autoprefixer");
const dirs = require("./dirs");
module.exports = {
entry: {
bundle: [
"./src/index.js",
],
},
resolve: {
mainFields: ["module", "main"],
extensions: [".js", ".ts"],
},
stats: {
children: false,
modules: false,
},
module: {
rules: [
{
test: /\.(js|ts)$/,
include: [dirs.NODE_MODULES, dirs.SRC],
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: [autoprefixer],
},
},
{
loader: "less-loader",
options: {
relativeUrls: false,
},
},
],
},
],
},
};