Skip to content

Update custom-blocks.md #1007

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

Closed
wants to merge 1 commit into from
Closed

Update custom-blocks.md #1007

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 15, 2017

this is vue-loader,not vue,in my opinion.

@ghost
Copy link
Author

ghost commented Oct 15, 2017

when I try to play the custom-blocks,I have a question.

#if I want to use custom-blocks and get single css file, how can i achieve it?

var ExtractTextPlugin1 = require("extract-text-webpack-plugin");
var ExtractTextPlugin2 = require("extract-text-webpack-plugin");

module.exports = {
entry: './myvu.js',
output: {
path: __dirname,
filename: 'bundle.js'
},
devtool: "inline-source-map",
module: {
rules: [
{
test: /.vue$/,
loader: 'vue-loader',
options: {
loaders: {
css: ExtractTextPlugin1.extract({
use: 'css-loader',
fallback: 'vue-style-loader' // 这是vue-loader的依赖,所以如果使用npm3,则不需要显式安装。
})
}
}
},
{
test: /.vue$/,
loader: 'vue-loader',
options: {
loaders: {
// 提取 中的内容为原始文本
'docs': ExtractTextPlugin2.extract('raw-loader')
}
}
}
]
},
resolve: {
alias: {
vue$: 'vue/dist/vue.js', //vue$表示精确匹配
}
},
plugins: [
new ExtractTextPlugin1("style.css"),
new ExtractTextPlugin2("docs.md")
]
}

@ghost
Copy link
Author

ghost commented Oct 15, 2017

the result is not what i want,because style.css and docs.md are same.
I hope docs.md just include sth about docs, and style.css just include sth about css.

@Jinjiang
Copy link
Member

when I try to play the custom-blocks,I have a question.

Do you mean the config loader: 'vue' leads to this problem? Or just another isolated question without your PR?

@Jinjiang
Copy link
Member

@vuejs/vue-loader-vueify I think it's not only for zh-cn docs. Because automatic -loader module name extension removed from webpack 2.
Thanks.

@kazupon
Copy link
Member

kazupon commented Oct 25, 2017

@Camille666 @Jinjiang
I hope that you will update it for other languages, because other translation maintenainer will be get easier and keep docs quality. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants