-
Notifications
You must be signed in to change notification settings - Fork 20
Update dependencies and restructure webpack config #130
Conversation
About treeshaking bootstrap-vue: Let's raise this as an issue first. Currently it's an undocumented? feature that authors can use any bootstrap-vue components in their site. |
Do we need both yarn.lock and package-lock.json? |
Good idea, will post all the other points as issues as well once this MarkBind/markbind#981 is done.
https://classic.yarnpkg.com/blog/2018/06/04/yarn-import-package-lock/ |
Apologies if I missed something... Is there a reason why we still need the non-minfied version? Afaik the non-minfied version has never been used anywhere, we just inherited it from the original project (which is no longer been updated). |
It can be useful in the future once this is a scoped package in /markbind, I'm preserving it as more of a skeleton right now. For e.g., I'm thinking of ( will be raised as issues once its a scoped package ):
|
546a729
to
14d86bb
Compare
14d86bb
to
54eb2ba
Compare
54eb2ba
to
bff651e
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.
Mostly LGTM, just a question :)
Do we use yarn
or npm
as the package manager for markbind or vue-strap? I think it would make sense for us to stick to just one, so we won't need to keep updating both lockfiles. It would make our dev environment more consistent as well.
I think most devs here use |
I think we should be fine to remove it. But let's check with @yamgent to see if there's any historical context for it's existence. |
I am unaware of anybody using yarn other than the original MarkBind developer (the original project that we fork from doesn't use yarn either). It is fine to remove |
The vue-strap fork is using highly outdated dependencies, which results in being unable to use some new features of vue-loader which can be helpful in development. Let’s update these dependencies, and restructure the webpack configs to accommodate webpack 4. Let’s also refactor the npm build script to only build the minified bundle, while also preserving the ability to build the non-minified bundle with a builddev script.
bff651e
to
c8805e7
Compare
Updated with yarn removed |
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.
LGTM 🚀
Thanks for reviewing this! @openorclose @yamgent @marvinchin |
What is the purpose of this pull request? (put "X" next to an item, remove the rest)
• [x] New feature
What is the rationale for this request?
As mentioned here #118 (comment), the version of vue-loader vue-strap is using is outdated since support for it was dropped long ago, which prevents us from using some useful features:
To upgrade vue-loader, almost all devDependencies had to be updated to accomodate webpack 4, which, going forward, can help with some things:
miniCssExtractPlugin
to load vue-strap styles in the<head>
of html files, which is a standard technique in production to reduce FOUC.markbind serve -o
to accelerate the development processmarkbind build
for asset files, helping with FOUCWhat changes did you make? (Give an overview)
Dependencies upgraded:
Dependencies removed:
Dependencies added:
Webpack configs and npm scripts:
build
now only uses the production webpack-merge config which builds the minified css file.builddev
builds the unminified files with sourcemaps ( we aren't using these currently, but I preserved it as it may be useful once we merge vue-strap into markbind for certain tasks )Testing instructions:
npm run build
and copy over the minified bundle, components should work as per usual. ( components page in docs would be a good place to test )Proposed commit message: (wrap lines at 72 characters)
Update dependencies and restructure webpack config
The vue-strap fork is using highly outdated dependencies, which results
in being unable to use some new features of vue-loader which can be
helpful in development.
Let’s update these dependencies, and restructure the webpack configs to
accommodate webpack 4.
Let’s also refactor the npm build script to only build the minified
bundle, while also preserving the ability to build the non-minified
bundle with a builddev script.