Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Merge requests
!7250
Add dts-css-modules-loader to generate .d.ts files so TypeScript can understand less imports
Code
Review changes
Check out branch
Download
Email patches
Plain diff
Closed
Administrator
requested to merge
github/fork/dloehr/add-dts-css-modules-loader
into
master
6 years ago
Overview
4
Commits
1
Pipelines
0
Changes
2
Created by: dloehr
0
0
Compare
master
master (base)
and
latest version
latest version
9f3d3b02
1 commit,
2 years ago
2 files
+
10
-
0
Expand all files
Preferences
Preferences
File browser
List view
Tree view
Compare changes
Inline
Side-by-side
Show whitespace changes
Show one file at a time
Search (e.g. *.vue) (Ctrl+P)
packages/re
act-scripts
con
fig
webpack.
config.js
+9
-0
packag
e.json
+1
-0
packages/react-scripts/config/webpack.config.js
+
9
-
0
Options
View file @ 9f3d3b02
Show full file
@@ -86,6 +86,15 @@ module.exports = function(webpackEnv) {
const
getStyleLoaders
=
(
cssOptions
,
preProcessor
)
=>
{
const
loaders
=
[
isEnvDevelopment
&&
require
.
resolve
(
'
style-loader
'
),
useTypeScript
&&
isEnvDevelopment
&&
cssOptions
.
modules
&&
{
loader
:
require
.
resolve
(
'
dts-css-modules-loader
'
),
options
:
{
banner
:
'
// This file is generated automatically by dts-css-modules-loader
'
,
},
},
isEnvProduction
&&
{
loader
:
MiniCssExtractPlugin
.
loader
,
options
:
shouldUseRelativeAssetPaths
?
{
publicPath
:
'
../../
'
}
:
{},
packages/react-scripts/package.json
+
1
-
0
Options
View file @ 9f3d3b02
Show full file
@@ -42,6 +42,7 @@
"css-loader"
:
"2.1.1"
,
"dotenv"
:
"6.2.0"
,
"dotenv-expand"
:
"4.2.0"
,
"dts-css-modules-loader"
:
"^1.0.1"
,
"eslint"
:
"^5.16.0"
,
"eslint-config-react-app"
:
"^4.0.1"
,
"eslint-loader"
:
"2.1.2"
,
Menu
Explore
Projects
Groups
Snippets