Skip to content
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

Closed

Conversation

ifahrentholz
Copy link
Member

@ifahrentholz ifahrentholz commented Jan 10, 2020

== 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

@ifahrentholz ifahrentholz added the enhancement New feature or request label Jan 10, 2020
@ifahrentholz ifahrentholz added this to the 2.1.0 milestone Jan 10, 2020
packages/assemble-lite/package.json Show resolved Hide resolved
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
},
"scripts": {},
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

packages/pv-stylemark/package.json Show resolved Hide resolved
@@ -0,0 +1,13 @@
// babel.config.js
Copy link
Member

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

Copy link
Member

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:
Copy link
Member

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

Copy link
Member Author

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": {
Copy link
Member

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

@@ -0,0 +1,42 @@
import getFileExtension from "./getFileExtension";
Copy link
Member

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

packages/webpack-config/src/helpers/paths.js Show resolved Hide resolved
packages/webpack-config/src/helpers/paths.js Show resolved Hide resolved
@friewerts friewerts closed this Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants