-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
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.
it looks like you're on the right path here. feel free to reach out to me if you have a question or get confused.
edit: don't forget to update the version number in the packages/react-scripts/package.json
const chalk = require('react-dev-utils/chalk'); | ||
const fs = require('fs-extra'); | ||
const webpack = require('webpack'); | ||
const configFactory = require('../config/webpack.config'); |
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.
this part might be slightly tricky, but basically we will need to change the config
object that configFactory
produces on like 63.
it could be as simple as reassigning some of the properties and values inside the object.
@@ -24,7 +24,7 @@ const scriptIndex = args.findIndex( | |||
const script = scriptIndex === -1 ? args[0] : args[scriptIndex]; | |||
const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : []; | |||
|
|||
if (['build', 'eject', 'start', 'test'].includes(script)) { | |||
if (['build', 'eject', 'start', 'test', 'build-component'].includes(script)) { |
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.
it looks like you're on the right path here. i don't know all the places you have to declare this new build-component
script exists, but we could probably just grep for build
or whatever to find out.
default: false, | ||
}, | ||
}; | ||
config.output.filename = 'main.js'; |
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'm just making a note here
we will eventually want to declare external dependencies here.
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.
👏
No description provided.