Skip to content

Commit 811c7e3

Browse files
author
Barthélémy Ledoux
authored
feat: allow to import/require files in CRA plugin out of src (#16453)
1 parent a8aa9d0 commit 811c7e3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

npm/react/plugins/utils/get-transpile-folders.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// @ts-check
2+
const path = require('path')
3+
24
function getTranspileFolders (config) {
3-
const folders = []
5+
const rawFolders = config.addTranspiledFolders ?? []
6+
const folders = rawFolders.map((folder) => path.resolve(config.projectRoot, folder))
47

58
// user can disable folders, so check first
69
if (config.componentFolder) {

0 commit comments

Comments
 (0)