I use vue-cli to fake a Vue.js + Webpack application, and I am confused how, as a basic example, to include something like Zurb Foundation .
I installed the necessary dependencies and downloaders, such as sass-loader and css-loader , but just got confused at the fundamental level of understanding how you can configure Webpack to compile and include, for example node_modules/foundation-sites/scss/foundation.scss
In my webpack configuration, I have:
module: { loaders: [ { test: /\.scss$/, loaders: ["style", "css", "sass"], include: projectRoot } ...
In my core component of App.vue , I have:
<style src="./scss/app.scss" lang="scss"></style>
And in my app.scss I tried, to no avail:
@import '~foundation-sites/scss/foundation.scss';
(among many other syntactically incorrect attempts that threw errors)
I believe that I am missing something fundamental in how Webpack works with npm or bower packages. Any direction would be greatly appreciated as this seems like a simple problem without a clear answer that I can find.
Copying the necessary files from node_modules seems illogical or not an ideal solution.
waffl
source share