-
Notifications
You must be signed in to change notification settings - Fork 532
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
Separate bundle and remove deprecated fields #121
Separate bundle and remove deprecated fields #121
Conversation
I will correct the merge problem beforehand |
package.json
Outdated
@@ -6,7 +6,8 @@ | |||
"main": "dist/vue-form-generator.js", | |||
"scripts": { | |||
"prebuild": "npm run test", | |||
"build": "webpack --progress --config webpack.build.config.js", | |||
"build": "webpack --progress --config webpack.build.config.js --define process.env.FULL_BUNDLE=true", | |||
"buildcore": "webpack --progress --config webpack.build.config.js --define process.env.FULL_BUNDLE=false --output-filename=vue-form-generator-core.js", | |||
"dev": "webpack-dev-server --config webpack.dev.config.js --inline --hot --content-base dev/", |
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.
Please create 3 build script.
"build:core": "...."
"build:full": "...."
"build": "npm run build:core && npm run build:full"
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 I will add it
}); | ||
|
||
if (process.env.FULL_BUNDLE) { // eslint-disable-line | ||
let Fields = require.context("./fields/optional", false, /^\.\/field([\w-_]+)\.vue$/); |
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.
Maybe name this optionalFields
so it's more clear what it does.
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.
Yes, I wasn't sure. I will change it too.
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 don't agree with optionalFields
, because in the future maybe we will add other stuffs to the full
bundle.
Sorry, a bit of confusion on my part. I was not seeing the latest commit. |
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.
Nice PR! Thanks! Mergeable 👍
Separation into 2 bundles: "core" and "optionnal" #112
removing deprecated fields #120