[Vuejs]-Import JS file placed in /public into JS file in /src

0👍

If you’re asking how you can navigate into a different folder, you can navigate up one level of a folder using ../.

It would look like this: '../public/your-file.js'

If you need to navigate up two (or more), just add another ../ for each level like this '../../folder/file.js'

0👍

You are trying to import something that is not set to be imported, probably your path is correct but you need to make the function that returns the configuration accessible to be imported.

Just change your settings file , so your function getSetting can be imported

export const getSettings = () => {
  return settings
}

then in your “src” file just

 import { getSettings } from '../public/../../'

Leave a comment