Socket
Socket
Sign inDemoInstall

webpack-libify

Package Overview
Dependencies
3
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    webpack-libify

libfiy your src


Version published
Weekly downloads
5
Maintainers
3
Install size
77.6 kB
Created
Weekly downloads
 

Readme

Source

webpack-libify

Show Your Webpack Loader Transformed Source!

New Features

  • support ts and tsx files

约定

  • 使用到的 src 源码需要转化到 lib 中
  • src 中 require 的 id 不需要进行改变: abc.css -> abc.css.js, abc.jsx -> abc.jsx.js
  • ts 文件配合resolve.extensions直接引入, abc.ts -> abc.js
  • 所有 lib 中的模块 node 可运行

用法

// in your webpack.config.js
const libify = require.resolve('webpack-libify');

module.postLoaders: [ { loader: libify } ]

webpack_public_path

基于 require('js-tokens') 技术, 使用类 require("../webpack.config")[0].output.publicPath 替换掉 __webpack_public_path__

Keywords

FAQs

Last updated on 04 Dec 2017

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc