-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Can not set specific single entry outside the src #1091
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
Comments
Unless I'm minstaken, the So for now, you will have to work around this by using vue.config.js and an env variable:
const path = require('path')
module.exports = {
chainWebpack: config => {
if (process.env.VUE_SERVE_DOCS) {
config.entry('app' ).set(path.resolve(__dirname, './docs/main.ts')
}
}
} |
The I use
const path = require('path');
const SOLUTION = process.env.VUE_SOLUTION;
module.exports = {
chainWebpack: config => {
const context = config.store.get('context');
const resolve = _path => path.resolve(context, _path);
if (SOLUTION === 'docs') {
config
.entry('app')
.clear()
.add(resolve('docs/main.ts'));
}
},
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
3.0.0-beta.6
Reproduction link
https://github.com/HuijiFE/void-ui/tree/0.1
Steps to reproduce
What is expected?
Serve a entry that not in directory 'src'. (docs/main.ts)
What is actually happening?
log for serve command
log for build command
The problem occurs when there is no entry in the src.
The text was updated successfully, but these errors were encountered: