1
Fork 0
mirror of https://github.com/Steffo99/bluelib.git synced 2024-12-22 11:34:21 +00:00
bluelib/preact.config.js
2020-06-25 18:26:06 +02:00

35 lines
924 B
JavaScript

const DefinePlugin = require("webpack/lib/DefinePlugin");
export default function (config, env, helpers) {
config.module.rules[4].include = [env.source(".")];
config.module.rules[5].exclude = [env.source(".")];
// noinspection JSUnresolvedVariable
config.resolve.alias["react"] = "preact/compat";
// noinspection JSUnresolvedVariable
config.resolve.alias["react-dom"] = "preact/compat";
config.module.rules.push(
{
test: /\.nojekyll$/,
loader: 'file-loader',
options: {
name: '.nojekyll'
}
}
);
config.module.rules.push(
{
test: /CNAME$/,
loader: 'file-loader',
options: {
name: 'CNAME'
}
}
);
config.plugins.push(
new DefinePlugin({"process.env.RELEASE": `"${process.env.npm_package_version}"`})
);
};