This commit is contained in:
初志鑫 2020-07-30 11:35:11 +08:00
parent b28cf91468
commit 2d78178795

View File

@ -68,7 +68,6 @@ module.exports = {
resolve: { resolve: {
alias: { alias: {
"@": resolve("src"), "@": resolve("src"),
"^": resolve("src/components"),
}, },
}, },
plugins: [ plugins: [
@ -87,6 +86,7 @@ module.exports = {
.exclude.add(resolve("src/remixIcon")) .exclude.add(resolve("src/remixIcon"))
.add(resolve("src/colorfulIcon")) .add(resolve("src/colorfulIcon"))
.end(); .end();
config.module config.module
.rule("remixIcon") .rule("remixIcon")
.test(/\.svg$/) .test(/\.svg$/)
@ -96,6 +96,7 @@ module.exports = {
.loader("svg-sprite-loader") .loader("svg-sprite-loader")
.options({ symbolId: "remix-icon-[name]" }) .options({ symbolId: "remix-icon-[name]" })
.end(); .end();
config.module config.module
.rule("colorfulIcon") .rule("colorfulIcon")
.test(/\.svg$/) .test(/\.svg$/)
@ -105,6 +106,7 @@ module.exports = {
.loader("svg-sprite-loader") .loader("svg-sprite-loader")
.options({ symbolId: "colorful-icon-[name]" }) .options({ symbolId: "colorful-icon-[name]" })
.end(); .end();
config.when(process.env.NODE_ENV === "development", (config) => { config.when(process.env.NODE_ENV === "development", (config) => {
config.devtool("source-map"); config.devtool("source-map");
}); });