1

During the build process (using vue-service-cli buid, via vue ui gui), the following error is displayed but I can't find where the declaration is made for src/main.ts. vue: 2.5.21, vue-cli: 3.2.1

   ERROR  Failed to compile with 1 errors1:58:38 PM

   This relative module was not found:

   * ./src/main.ts in multi ./src/main.ts

   ERROR  Build failed with errors.

web.config.js

main.ts is defined in ClientApp

       entry: { "main": "./ClientApp/main.ts" },

Is vue (or webpack) hard-wired to have a src dir?

1 Answer 1

1

Try clearing the webpack entry points beforehand:

// vue.config.js
module.exports = {
  configureWebpack: config => {
    config.entry('main')
          .clear()
          .add('./ClientApp/main.ts')
  }
}
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks but I get this error now: TypeError: config.entry is not a function. But It was very helpful learning about the vue config option

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.