Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@nuxtjs/markdownit-loader
Advanced tools
Webpack loader to translate markdown to HTML using markdownit.
Convert Markdown file to HTML using markdown-it.
npm i @nuxtjs/markdownit-loader --save-dev
webpack.config.js
file (webpack 2.x):
module.exports = {
module: {
rules: [{
test: /\.md/,
loader: 'markdownit-loader'
}]
}
};
See markdown-it for a complete list of possible options.
module.exports = {
module: {
rules: [
{
test: /\.md/,
use: [
{ loader: 'raw-loader' },
{
loader: 'markdownit-loader',
options: {
// markdown-it config
preset: 'default',
breaks: true,
preprocess: function(markdownIt, source) {
// do any thing
return source
},
use: [
/* markdown-it plugin */
'markdown-it-xxx',
/* or */
['markdown-it-xxx', 'this is options']
]
}
}
]
}
]
}
};
Or you can customize markdown-it
var markdown = require('markdown-it')({
html: true,
breaks: true
})
markdown
.use(plugin1)
.use(plugin2, opts, ...)
.use(plugin3);
module.exports = {
module: {
rules: [
{
test: /\.md/,
use: [
{ loader: 'raw-loader' },
{
loader: 'markdownit-loader',
options: markdown
}
]
}
]
}
};
Resource references can only use absolute path
e.g.
webpack config
resolve: {
alias: {
src: __dirname + '/src'
}
}
It'is work
<img src="~src/images/abc.png">
<script>
import Image from 'src/images/logo.png'
import Hello from 'src/components/hello.vue'
module.exports = {
}
</script>
Incorrect
<img src="../images/abc.png">
<script>
import Image from '../images/logo.png'
import Hello from './hello.vue'
module.exports = {
}
</script>
MIT
FAQs
Webpack loader to translate markdown to HTML using markdownit.
The npm package @nuxtjs/markdownit-loader receives a total of 6,933 weekly downloads. As such, @nuxtjs/markdownit-loader popularity was classified as popular.
We found that @nuxtjs/markdownit-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.