-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
fixed babel configuration for #208 #240
Conversation
2e49f20
to
d5b2d17
Compare
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.
- Create a new setting, like
packages_to_transpile
- Don't overload
additional_paths
- Needs documentation and changelog
app_javascript, | ||
createInMemoryFs, | ||
createTestCompiler, | ||
} |
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.
editor setup is incorrect
needs new line
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.
@justin808 thanks fixed and created a new issue for eslint config: #242
package/rules/__tests__/babel.js
Outdated
expect(tracked[ignored]).toBeUndefined(); | ||
}); | ||
|
||
test('process included node_modules', async () => { |
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.
we should never transpile all of node_modules. Are you checking for only the additional paths?
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.
@justin808 sure we do, and also we do have a test case for this. I'll work on a better verbiage.
package/rules/__tests__/babel.js
Outdated
const [tracked, loader] = createTrackLoader(); | ||
const compiler = createTestCompiler(createWebpackConfig(included, loader)); | ||
await compiler.run(); | ||
expect(tracked[included]).toBeTruthy(); |
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.
Need to check that that the files outside of node_modules/included and inside of node_modules are not transpiled, in at least one test.
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.
18f87a9
to
b0da1e9
Compare
@justin808 I've updated the changelog, but I'm not sure how adding additional property additional_paths: ['app/assets', 'node_modules/to_transpile'] vs additional_paths: ['app/assets']
packages_to_transpile: ['node_modules/to_transpile'] So |
Let's update the branch and merge it. |
b0da1e9
to
16129a7
Compare
In specific scenarios, you would need to transpile some of
node_modules
. This addition allows to specifynode_modules
to include viawebpacker.yml => additional_paths
configuration.closes #208