Skip to content

Commit

Permalink
feat: allow to import/require files in CRA plugin out of src (#16453)
Browse files Browse the repository at this point in the history
  • Loading branch information
Barthélémy Ledoux authored May 11, 2021
1 parent a8aa9d0 commit 811c7e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion npm/react/plugins/utils/get-transpile-folders.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// @ts-check
const path = require('path')

function getTranspileFolders (config) {
const folders = []
const rawFolders = config.addTranspiledFolders ?? []
const folders = rawFolders.map((folder) => path.resolve(config.projectRoot, folder))

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

0 comments on commit 811c7e3

Please sign in to comment.