-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
examples(coffeescript): update module #6248
Conversation
packages/builder/src/builder.js
Outdated
@@ -44,7 +44,7 @@ export default class Builder { | |||
restart: null | |||
} | |||
|
|||
this.supportedExtensions = ['vue', 'js', ...(this.options.build.additionalExtensions || [])] | |||
this.supportedExtensions = ['vue', 'js', ...(this.options.extensions || []), ...(this.options.build.additionalExtensions || [])] |
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.
Are these options identical now? /cc @kevinmarrec
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.
@pi0 No
https://github.com/nuxt/typescript/blob/master/packages/typescript-build/lib/module.js#L18
We need to be aware that the 2 options aren't used at the same places in core
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.
options.extensions
is more or less related to runtime, meanwhile the others only buildtime
Codecov Report
@@ Coverage Diff @@
## dev #6248 +/- ##
=======================================
Coverage 95.72% 95.72%
=======================================
Files 80 80
Lines 2666 2666
Branches 687 687
=======================================
Hits 2552 2552
Misses 98 98
Partials 16 16
Continue to review full report at Codecov.
|
Any reason for not using additionalExtensions? If extensions cover additionalExtensions, probably we should remove the duplicate one. |
@pi0 @clarkdo If I created a new option it's cause there was a particular need. All i know is that And This requested change https://github.com/nuxt/nuxt.js/pull/6248/files#diff-4f235fc89b94513b32c2cc8b5896cc5aR47 , would make Having only one Idk EDIT : |
@kevinmarrec Seems reasonable to have separated ones because of |
Sorry, I didn’t mean that we need to keep only one config, I mean that why we need to merge extensions into supportedExtensions instead of configuring additionalExtensions. For the coffeescript case, only adding this won’t work, user still needs to setup loader. And current change also changed the resolving order and files of routes, it’s kind of breaking change for users having files inside pages dir but not meant to be a route. |
Exactly @clarkdo, cofeescript support for routes should leverage If somehow cofeescript files should be resolved for other files like serverMiddlewares or local modules, then it should be done like TypeScript module by using both of config extensions options : https://github.com/nuxt/typescript/blob/master/packages/typescript-build/lib/module.js#L18 |
The breaking change seems introduced by 2.4.5...2.5.1 -- we are reverting :) |
@pi0 AFAIK routes supported extensions never used options before. It was hardcoded, what breaking change was introduced ? |
According the issue, a partial fix was found making Vuex World but not local modules, which kind of relevant as to have coffee work everywhere it nows need to be added in both extensions options I think the fix it just about adding There was anyway Indeed something changed in internals. Once upon a time there was a |
@pi0 LGTM now, juste need title update |
Types of changes
Description
Resolves #5423
Checklist: