[Vuejs]-Import js library vue cli + webpack

0👍

i have a vue.config.js file like this i can’t find any other config file for webpack in my project

module.exports = {
    // proxy API requests to Valet during development
    devServer: {
        //proxy: 'http://api.mtm'
    },
    indexPath: 'public/index.html',
}

to import js file i’ve tried like this directly in my Vue component just after the export default {..

require('../../public/timer.js');

the error i have looks like that : TypeError: t is undefined

Leave a comment