This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree 3 files changed +63
-52
lines changed
3 files changed +63
-52
lines changed Original file line number Diff line number Diff line change
1
+ module . exports = function ( api ) {
2
+ const isProd = process . env . APPMODE === "production" ;
3
+ api . cache ( ! isProd ) ;
4
+
5
+ const generateScopedName = isProd
6
+ ? "[hash:base64:6]"
7
+ : "teams_[path][name]___[local]___[hash:base64:6]" ;
8
+ return {
9
+ presets : [ "@babel/preset-env" , "@babel/preset-react" ] ,
10
+ plugins : [
11
+ [
12
+ "@babel/plugin-transform-runtime" ,
13
+ {
14
+ useESModules : true ,
15
+ regenerator : false ,
16
+ } ,
17
+ ] ,
18
+ [
19
+ "react-css-modules" ,
20
+ {
21
+ filetypes : {
22
+ ".scss" : {
23
+ syntax : "postcss-scss" ,
24
+ } ,
25
+ } ,
26
+ generateScopedName,
27
+ } ,
28
+ ] ,
29
+ "inline-react-svg" ,
30
+ ] ,
31
+ env : {
32
+ test : {
33
+ presets : [
34
+ [
35
+ "@babel/preset-env" ,
36
+ {
37
+ targets : "current node" ,
38
+ } ,
39
+ ] ,
40
+ ] ,
41
+ plugins : [
42
+ [
43
+ "module-resolver" ,
44
+ {
45
+ alias : {
46
+ styles : "./src/styles" ,
47
+ components : "./src/components" ,
48
+ hooks : "./src/hooks" ,
49
+ utils : "./src/utils" ,
50
+ constants : "./src/constants" ,
51
+ services : "./src/services" ,
52
+ } ,
53
+ } ,
54
+ ] ,
55
+ ] ,
56
+ } ,
57
+ } ,
58
+ } ;
59
+ } ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -4,7 +4,10 @@ const singleSpaDefaults = require("webpack-config-single-spa-react");
4
4
const path = require ( "path" ) ;
5
5
const autoprefixer = require ( "autoprefixer" ) ;
6
6
7
- const cssLocalIdent = "teams_[path][name]___[local]___[hash:base64:6]" ;
7
+
8
+ const cssLocalIdent = process . env . APPMODE === "production"
9
+ ? "[hash:base64:6]"
10
+ : "teams_[path][name]___[local]___[hash:base64:6]" ;
8
11
9
12
module . exports = ( webpackConfigEnv ) => {
10
13
const defaultConfig = singleSpaDefaults ( {
You can’t perform that action at this time.
0 commit comments