GregYankovoy / vue-cli-plugin-bootstrap-vue

vue-cli 3 plugin to add bootstrap-vue
MIT License
34 stars 2 forks source link

Respect configured `entry` #3

Open riker09 opened 5 years ago

riker09 commented 5 years ago

I have a different entry configured in my vue.config.js:

module.exports = {
  configureWebpack: {
    entry: './src/app.ts',
  }
}

I get this error when running vue add bootstrap-vue:

-  Running completion hooks... ERROR  Error: ENOENT: no such file or directory, open 'C:\Users\user\my-vue-app\src\main.js'
Error: ENOENT: no such file or directory, open 'C:\Users\user\my-vue-app\src\main.js'
    at Object.openSync (fs.js:447:3)
    at Object.readFileSync (fs.js:349:35)
    at Object.updateMain (C:\Users\user\my-vue-app\node_modules\vue-cli-plugin-bootstrap-vue\generator\helpers.js:48:24)
    at C:\Users\user\my-vue-app\node_modules\vue-cli-plugin-bootstrap-vue\generator\index.js:34:13
    at runGenerator (C:\Users\user\AppData\Roaming\npm\node_modules\@vue\cli\lib\invoke.js:155:13)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
    at async invoke (C:\Users\user\AppData\Roaming\npm\node_modules\@vue\cli\lib\invoke.js:117:3)
GregYankovoy commented 5 years ago

Are you using the cli to create your application? Most CLI plugins and the built-in APIs check for a typescript main.ts, and fall back to main.js if it does not exist.

I have no issue adding the feature, but would you mind explaning how/why you have a different entry point? Would help me understand how to best implement the checks.

riker09 commented 5 years ago

I have a legacy app that is using webpack2/3 (not even sure which one). I wanted to move over to Vue CLI and webpack 4 but after two day came to a point where I realized that it is probably not worth it.

During my efforts I came across this issue and thought "Hey, I can configure the entrypoint(s). Neat-o. But then every plugin that does anything with that should support custom entrypoints."

But you may feel free to close and disregard this issue. 🙂