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

Webpack loader support #42

Closed
7 of 13 tasks
lijunle opened this issue Nov 11, 2015 · 13 comments · Fixed by #65
Closed
7 of 13 tasks

Webpack loader support #42

lijunle opened this issue Nov 11, 2015 · 13 comments · Fixed by #65
Labels

Comments

@lijunle
Copy link
Member

lijunle commented Nov 11, 2015

From @lijunle on September 19, 2015 21:20

Webpack loaders are a special way to "load" code into webpack.

There are two syntax to use webpack loader:

  • Via require function
  • Via webpack config file

Copied from original issue: lijunle#14


There are several syntaxes about Webpack loaders:

  • The require calls. (example) [3]
  • CLI --module-bind options. (example) [2]
  • Configuration properties.
    • Single loader in module.loaders.loader string (example) [1]
    • Multiple loaders concatenated with ! in module.loaders.loader string (example) [1]
    • Multiple loaders in module.loaders.loaders array (example) [1]
    • Loader with queries in module.loaders.loader string (example) [1]

Other considerations about loader:

Notes:

  • The items marked as [1] will be implemented and supported.
  • The items marked as [2] will be supported with the default values. If someone request and provide his meaningful scenario, open an issue and let us how to support it.
  • The items marked as [3] are considered as not supported. If you think they are necessary and have a good reason, please open an issue.
@lijunle
Copy link
Member Author

lijunle commented Nov 11, 2015

From @js08 on October 21, 2015 16:3

@lijunle is the issue fixed

@lijunle
Copy link
Member Author

lijunle commented Nov 11, 2015

No, not yet. I do not have full scenario to support this. If you have a project using webpack, then you can depcheck the project and resolve the webpack issues. I guess webpack might be complex because it use its naming convention to require packages.

@lijunle
Copy link
Member Author

lijunle commented Nov 11, 2015

From @js08 on October 21, 2015 16:16

@lijunle to check webpack dependencies do I need to use special commands

@lijunle
Copy link
Member Author

lijunle commented Nov 11, 2015

Let me clarify, webpack has many loaders, plugins, etc. There is a simple way to depend on one webpack loader/plugin (check this docs). Those usages do not follow require function call. We may need to some special way to detect them.

Currently, such special command does not exist.

If you want to work on this, read webpack's document and depcheck's pluggable design doc.

@lijunle
Copy link
Member Author

lijunle commented Nov 11, 2015

From @js08 on October 21, 2015 17:12

@lijunle does this npm package https://github.com/dylang/npm-check supports webpack

@lijunle
Copy link
Member Author

lijunle commented Nov 11, 2015

I don't think they support. Npm-check use depcheck to detect unused dependencies.

@lijunle
Copy link
Member Author

lijunle commented Nov 11, 2015

From @js08 on October 21, 2015 17:21

@lijunle so are you not checking for packages in devDependencies which is mention in package.json

@lijunle
Copy link
Member Author

lijunle commented Nov 11, 2015

@js08 I don't get your meaning, is that related to webpack issue? If not, please open another issue.

@lijunle
Copy link
Member Author

lijunle commented Nov 11, 2015

From @js08 on October 21, 2015 18:4

@lijunle if npm-check packages supports webpack we can use the same code in depcheck-es6

@lijunle
Copy link
Member Author

lijunle commented Nov 11, 2015

From @js08 on October 22, 2015 18:50

@lijunle can you tell what exactly is the issue its confusing

@lijunle
Copy link
Member Author

lijunle commented Nov 11, 2015

From @js08 on October 23, 2015 14:6

@lijunle lijunle#27 if you look at this it seems you have closed

@lijunle
Copy link
Member Author

lijunle commented Nov 11, 2015

From @js08 on October 26, 2015 14:19

@lijunle here is an example for todomvc app, can you fix it https://github.com/rackt/redux/blob/master/examples/todomvc/webpack.config.js#L22

@lijunle
Copy link
Member Author

lijunle commented Nov 11, 2015

Hi, @js08

I am sorry to tell you that, I am not going to work on this issue. Because of the estimated complexity of this issue is high, and the benefit is not very high. I will not work on this issue until my another working project reach my bar.

However, if you have ideas on this, please go ahead to implement it. I am welcome for a PR.

gtanner pushed a commit to gtanner/depcheck that referenced this issue Jan 19, 2016
Decouple existing parsers and detectors from index.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant