@a.gusev/symlink-webpack-plugin 中文文档教程
Symlink Webpack Plugin
用于在编译前在任何目录中创建符号链接的 Webpack 插件。 这对于代码重用非常有用,无需创建 npm 包。
Installation
npm i -D @a.gusev/symlink-webpack-plugin
Usage
在您的 webpack 配置中:
const SymlinkWebpackPlugin = require('@a.gusev/symlink-webpack-plugin');
module.exports = {
// ...etc
plugins: [
new SymlinkWebpackPlugin({
targetAbsolutePrefix: path.resolve(__dirname, "../common"), // default: output.path
pathAbsolutePrefix: __dirname, // default: output.path
paths: [
"src/css",
"src/js/styles",
"src/js/themes",
"src/js/utils",
".babelrc",
".browserslistrc",
".eslintrc.json"
]
})
]
};
此设置使符号链接
到
等。
Symlink Webpack Plugin
Webpack plugin for creating a symbolic link in any directory before compilation. This can be useful for code reuse without creating an npm package.
Installation
npm i -D @a.gusev/symlink-webpack-plugin
Usage
In your webpack config:
const SymlinkWebpackPlugin = require('@a.gusev/symlink-webpack-plugin');
module.exports = {
// ...etc
plugins: [
new SymlinkWebpackPlugin({
targetAbsolutePrefix: path.resolve(__dirname, "../common"), // default: output.path
pathAbsolutePrefix: __dirname, // default: output.path
paths: [
"src/css",
"src/js/styles",
"src/js/themes",
"src/js/utils",
".babelrc",
".browserslistrc",
".eslintrc.json"
]
})
]
};
This setting makes symbolic link <pathAbsolutePrefix>/src/css
to <targetAbsolutePrefix>/src/css
and etc.
更多
你可能也喜欢
- 3s-httpserver 中文文档教程
- @0xcert/ethereum-erc20 中文文档教程
- @168-cli/log 中文文档教程
- @3kles/kles-material-dynamicforms 中文文档教程
- @3kles/kles-ng-pipe 中文文档教程
- @3rdvision/yonius 中文文档教程
- @4alltecnologia/node-middleware-security 中文文档教程
- @4c/docusaurus-preset 中文文档教程
- @4tw/prettier-config 中文文档教程
- @a-action/semantic-release-config 中文文档教程