2
<!DOCTYPE html>
<html lang="">
  <head>
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
    <link rel="stylesheet" href="semantic/dist/semantic.min.css">

I have a basic Vue 3 project and within my public/index.html file I want to include files from root directory (e.g. node_modules or my semantic folder)

I've tried various configurations within vue.config.js file but seems like none of them works.

module.exports = {
  publicPath: '',
}

What's the proper way of including custom local css/js files into index.hmtl without moving them directly into public directory?

1 Answer 1

0

I was with a similar problem a time ago, I asked here too but I found the solution myself, here is the link, how I was using my own webpack configuration, it may differ from what you need to do, but I think the core is the same, the esModule option on file-loader was messing with the path of local files I wanted to load.

Sign up to request clarification or add additional context in comments.

Comments

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.