4.1.7 • Published 2 years ago

fractal-webpack-plugin v4.1.7

Weekly downloads
1,032
License
MIT
Repository
github
Last release
2 years ago

npm version npm

⚡️ fractal-webpack-plugin

Fractal webpack plugin to easily integrate fractal into a webpack workflow.

Requires webpack 4 or 5.

Installation

npm install fractal-webpack-plugin --save-dev

Usage

Do your fractal specific configurations in a fractal.config.js file and place it in the root of the project (or pass in a path in the configPath option).

See https://fractal.build/guide/project-settings for more information

Example webpack.config

const FractalWebpackPlugin = require('fractal-webpack-plugin');

module.exports = {
    entry: {
        app: path.resolve('./src/assets/js/app.js'),
    },
    output: {
        path: path.resolve('./public/js/'),
        filename: '[name].js',
    },
    module: {
        rules: [
            {
                test: /\.js$/,
                use: ['babel-loader'],
            },
        ],
    },
    plugins: [
        new FractalWebpackPlugin({
            mode: 'server', // mode: 'build'
            configPath: './folder/fractal.config.js' // defaults to 'fractal.config.js'
        })
    ]
};

Options

mode

Type: string Default: server

Boot up a server or build a static page.

Available modes: server and build

configPath

Type: string Default: fractal.config.js

Path to where the fractal.js file is located.

Release

To create a new release simply run

npm run release
4.1.7

2 years ago

4.1.6

2 years ago

4.1.4

2 years ago

4.1.3

2 years ago

4.1.5

2 years ago

4.1.2

2 years ago

4.1.0

3 years ago

3.0.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago