-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
[Feature] support {String|Function}
input for hot reloading (options.modifyVars
)
#229
Comments
You can try for watch mode at least webpack.config.js {
test: /\.less$/,
use: [
{
loader: 'less-loader',
options: (loader) => {
loader.addDependency('path/to/theme')
return {
modifyVars: theme
}
}
}
]
} But I'm not 💯, if it works with webpack.config.js {
test: /\.less$/,
use: [
{
loader: 'less-loader',
options: {
ident: 'less',
modifyVars: (loader) => {
loader.addDependency('path/to/theme')
return require('path/to/theme')
}
}
}
]
} |
@michael-ciniawsky Seems to not accept the error info
my configuration by vue-cli webpack template // generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
var loaders = [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: (loader) => {
loader.addDependency('../src/styles/theme/esf')
return Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap,
modifyVars: theme
})
}
// options: Object.assign({}, loaderOptions, {
// sourceMap: options.sourceMap,
// modifyVars: theme
// })
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
} |
Yeah, that's what I meant with 'maybe' 😞, we need to accept a |
@michael-ciniawsky ok,thanks😁 |
{String|Function}
input for hot reloading (options.modifyVars
)
Anything I can do to help make this a reality? |
Any news on this PR please ? |
@michael-ciniawsky Do you plan to add hot reloading here? |
PR welcome |
We implement |
Is there any information how can it be achieved ? |
This helped me |
webpack config
theme.js
every change in theme.js I have to restart the server
npm run
😆,how to hot reload?thanks
The text was updated successfully, but these errors were encountered: