forked from fanruan/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.
60 lines
1.6 KiB
60 lines
1.6 KiB
5 years ago
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||
|
const autoprefixer = require("autoprefixer");
|
||
|
|
||
|
const dirs = require("./dirs");
|
||
|
|
||
|
module.exports = {
|
||
|
entry: {
|
||
|
fineui: [
|
||
|
"./typescript/index.ts",
|
||
|
],
|
||
|
},
|
||
|
resolve: {
|
||
|
mainFields: ["module", "main"],
|
||
|
extensions: [".js", ".ts"],
|
||
|
},
|
||
|
module: {
|
||
|
rules: [
|
||
|
{
|
||
|
test: /\.(js|ts)$/,
|
||
|
include: [dirs.NODE_MODULES, dirs.PRIVATE, dirs.TYPESCRIPT],
|
||
|
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,
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
};
|