build-tool-boilerplate
build-tool-boilerplate copied to clipboard
Load Vendor Scripts
Hi, thanks for that workaround. How can I use vendor stuff. My structure is -dist -src -vendor
And i want to merge all these js files from my vendors in my single js file. You did this with components in your src/js folder but i cant manage it.
For example, i load jquery inside my src/js/app.js like this. import "./vendor/jquery/jquery-3.4.1.min.js"; I also try ../../ but i cant manage it I get this error [!] Error: Could not resolve './vendor/jquery/jquery-3.4.1.min.js' from src/js/app.js
I hope you can help me. Thanks und greetings from germany
Any reason you can't include vendor
in the src
directory? The intent is that src
is specifically for any source code.
You can change the pathIn
in the rollup.config.js
file.
https://github.com/cferdinandi/build-tool-boilerplate/blob/master/rollup.config.js#L12
The reason to separate vendor .js file in my case is. Some vendor css has image and script references in it self or folder and in that case i think it would be better to keep every vendor related stuff in his folders.
One other thing i am fighting with is. I have an extra editor.scss for the wordpress backend. and in my WP function I have to load them separately, so that this file will only be loaded in WP Backend. For that case I tried to compile this file separately and save them to dist/css as editor.min.css and editor.min.css.map but i couldn't manage it :-/