-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infer loader from filetype #40
Infer loader from filetype #40
Conversation
"scripts": { | ||
"test": "echo \"Error: run tests from root\" && exit 1" | ||
}, | ||
"scripts": {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this key can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
@@ -0,0 +1,13 @@ | |||
// babel.config.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think all the jest-related stuff should be located in the root dir, to be later extended by the packages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,187 @@ | |||
// For a detailed explanation regarding each configuration property, visit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think all the jest-related stuff should be located in the root dir, to be later extended by the packages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the jest-config to root
@@ -66,5 +65,11 @@ | |||
"style-loader": "1.0.1", | |||
"webpack": "4.41.2", | |||
"webpack-merge": "4.2.2" | |||
}, | |||
"devDependencies": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think all the jest-related stuff should be located in the root dir, to be later extended by the packages
packages/webpack-config/src/helpers/getFileExtension/getFileExtension.js
Show resolved
Hide resolved
@@ -0,0 +1,42 @@ | |||
import getFileExtension from "./getFileExtension"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the mentioned edge-cases could also be part of the test
== Description ==
The pv.config.js should be as minimal as possible. To accomplish that we can infer some config values from the filetype. For example if the user configures the jsEntry to be "src/index.tsx" we can automatically set "useTS" and "useReact" to be true.
== Closes issue(s) ==
#39
== Changes ==
paths.js => config will be piped through the inferLoaderFromFiletype function.
== Affected Packages ==
webpack-config