-
Notifications
You must be signed in to change notification settings - Fork 23
Support for DtsCreator parameters via query parameters #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
Conversation
// you change the default options of the DtsCreator and e.g. use a different | ||
// output folder. | ||
var queryOptions = loaderUtils.parseQuery(this.query); | ||
var options; |
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.
Will DtsCreator
accept undefined
?
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.
Yea, if options isn't defined, it will just go on and use the defaults. If I'm not mistaken, new DtsCreator()
and new DtsCreator(undefined)
is going to be the exact same thing.
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've tested it btw, since in the end it turned out I didn't need to pass any options to the loader, thus having an undefined options object.
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.
ok, cool =)
Could you be so kind to update README as well? People should know about such possibility. |
I suggest removing the sentence "Has no configuration atm." and adding a new paragraph describing how to pass options in the webpack configuration. A link to the page where possible options are described will be very handy. Thanks! |
Oh, sorry! Of course the README should be updated! I'll fix that. |
@olegstepura - now the readme is updated as well. I updated the example as well, as I think there was a typo there. Can you please check that it is correct now, so I haven't misunderstood how to specify the loader (I'm using webpack indirectly via roc.js)? |
@@ -22,7 +22,7 @@ const settings = { | |||
{ | |||
test: /\.css$/, | |||
exclude: /node_modules/, | |||
loader: 'typed-css-modules' | |||
loader: 'typed-css-modules-loader' |
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.
Webpack allows to specify loaders without -loader
suffix. See https://webpack.github.io/docs/using-loaders.html#referencing-loaders
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.
Ah, right. I'll revert the commit that made the change. TIL. =)
This reverts commit 6b0a5b2.
…les-loader into olegstepura-patch-1
Now everything should be up to date with the changes you made on my fork. Feel free to merge. |
@Naycon Thanks for your improvements! |
👍 |
FYI: I've published new version to |
This pull request adds support for passing options to the
DtsCreator
(typed-css-modules) instance via webkits query parameters. I might as well contribute the code here even though I ended up not needing it.