npm.io
1.1.2-alpha.0 • Published 7 years ago

@what-src/plugin

Licence
MIT
Version
1.1.2-alpha.0
Deps
4
Size
4 kB
Vulns
0
Weekly
0

@what-src/plugin

what-src plugin bundle.

Check out the packages folder for more information.

Usage

First install the plugin from npm.

npm install @what-src/plugin --save-dev

what-src respects your systems $EDITOR environment variable (default: "vscode") Read here for more info.

babel (required)

Via .babelrc or babel-loader.

{
  "plugins": [
    "module:@what-src/plugin",
    ...
  ]
}
Webpack-Dev-Server
$ webpack.config.js


const { WhatSrcServerWebpackPlugin } = require('@what-src/plugin') // <- import plugin

...
module.exports = {
  mode: 'development',
  entry: './src/index.jsx',
  output: {
    filename: 'bundle.js',
  },
  ...
plugins: [new WhatSrcServerWebpackPlugin()] // <- add plugin
...
}
$ package.json
{
  ...
  "scripts": {
    ...
    "develop": "webpack-dev-server"
  },
  ...
}
npm run develop

NOTE: The server runs on port 8018 by default.

License

MIT