0👍
If I understand well your project arch is like
/root
|__/public
| |__/img
| |__/css
| |__/constants
| |__/foo.js
| |__/bar.js
|__/webpack.config.js
In your webpack.config.js
create a new entry like
module.exports = {
entry: './public/index.js'
};
Then create a index.js
file inside your public directory and import your foo.js
import foo from './constants/foo';
Of course your foo.js
should export something like
export default function foo() {
//
}
Hoping that will help you.
- [Vuejs]-Some component styles not included in build
- [Vuejs]-How i can to store a set of components for some separate vue apps?
Source:stackexchange.com