@fanion/webpack
TypeScript icon, indicating that this package has built-in type declarations

1.4.8 • Public • Published

@fanion/webpack

Yet another opiniated Webpack configuration for NodeCG bundles

Table of Contents

Install

$ npm install @fanion/webpack

Usage

Create a new file called webpack.config.js and write the configuration you need.

Here's an example using Vue.js with the following file structure:

src/
├── dashboard/
|   └── views/
|   |   ├── lorem/
|   |   |   ├── App.vue
|   |   |   └── index.ts
|   |   └── ipsum/
|   |       ├── App.vue
|   |       └── index.ts
|   └── template.html
├── extension/
|   └── index.ts
└── graphics/
    ├── views/
    |   ├── lorem/
    |   |   ├── App.vue
    |   |   └── index.ts
    |   └── ipsum/
    |       ├── App.vue
    |       └── index.ts
    └── template.html
const fanion = require("@fanion/webpack");

module.exports = fanion({
  variants: {
    extension: {
      source: "src/extension/index.ts",
    },
    dashboard: {
      source: "src/browser/dashboard/views/*/index.ts",
      template: "src/browser/dashboard/template.html",
      use: require("@fanion/preset-vue"),
    },
    graphics: {
      source: "src/browser/graphics/views/*/index.ts",
      template: "src/browser/graphics/template.html",
      use: require("@fanion/preset-vue"),
    },
  },
});

API

See the declaration file.

Author

Alexandre Breteau - @0xSeldszar

License

MIT © Alexandre Breteau

Readme

Keywords

none

Package Sidebar

Install

npm i @fanion/webpack

Weekly Downloads

52

Version

1.4.8

License

MIT

Unpacked Size

40.1 kB

Total Files

15

Last publish

Collaborators

  • seldszar