-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Making webpacker aware of vue.config.js #2221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It seems that I don't think they are compatible since they compete to fill the same job (in different ways). |
Seems I was able to pass the config I wanted directly on the environment file that is passed to webpacker - but I would like to know how I can pass options to the base webpack config if I want to do more advanced stuff like tree shaking, code splitting and lazy loading.. |
Glad it worked out. Tree shaking should be on by default to vanilla webpack. You can find code splitting and lazy loading docs here. |
@gkatsanos can you show a more detailed example of what you did to "pass the config directly on the environment". I'm not following what you did there. My use case is trying to load a |
@zeroedin I know this is kind of an old issue, but just to let you know what I've found out :) I don't know if you've ran into this issue, but it I've built on top of it and got the here's the code I've added before // Get the actual sass-loader config
const sassLoader = environment.loaders.get('sass')
const sassLoaderConfig = sassLoader.use.find(function(element) {
return element.loader == 'sass-loader'
})
// Use Dart-implementation of Sass (default is node-sass)
const options = sassLoaderConfig.options
options.implementation = require('sass')
options.additionalData = `@import "@/../assets/scss/_variables.scss";` |
I think you should mix Webpacker and |
Uh oh!
There was an error while loading. Please reload this page.
Several Vue libraries and vue itself recommend a
vue.config.js
file as a means to pass configuration options to Webpack.I can't figure out how to make webpack aware of the file (or, where to place it)
My structure is
I tried putting vue.config.js in app.
The text was updated successfully, but these errors were encountered: