Fractal webpack plugin to easily integrate fractal into a webpack workflow.
Requires webpack 4+.
npm install fractal-webpack-plugin --save-dev
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'
})
]
};
Type: string
Default: server
Boot up a server or build a static page.
Available modes: server
and build
Type: string
Default: fractal.config.js
Path to where the fractal.js file is located.
To create a new release simply run
npm run release