Update to Webpack 5
This commit is contained in:
parent
d599032cef
commit
c609389aaf
4 changed files with 1610 additions and 382 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
import { resolve } from 'path';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { Configuration, EnvironmentPlugin } from 'webpack';
|
||||
import { Configuration, EnvironmentPlugin, ProvidePlugin } from 'webpack';
|
||||
import HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
const context = __dirname;
|
||||
|
@ -43,23 +43,23 @@ const stickerCreatorConfig: Configuration = {
|
|||
rules: [
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
loader: 'babel-loader',
|
||||
use: [{ loader: 'babel-loader' }],
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
loaders: ['style-loader', 'css-loader'],
|
||||
use: [{ loader: 'style-loader' }, { loader: 'css-loader' }],
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
loaders: [
|
||||
'style-loader',
|
||||
'css-loader?modules=true&localsConvention=camelCaseOnly',
|
||||
'sass-loader',
|
||||
use: [
|
||||
{ loader: 'style-loader' },
|
||||
{ loader: 'css-loader?modules=true&localsConvention=camelCaseOnly' },
|
||||
{ loader: 'sass-loader' },
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.woff2?$/,
|
||||
loader: 'file-loader',
|
||||
use: [{ loader: 'file-loader' }],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -68,6 +68,7 @@ const stickerCreatorConfig: Configuration = {
|
|||
alias: {},
|
||||
},
|
||||
plugins: [
|
||||
new ProvidePlugin({ Buffer: ['buffer', 'Buffer'] }),
|
||||
new EnvironmentPlugin(['NODE_ENV']),
|
||||
new HtmlWebpackPlugin({
|
||||
title: 'Signal Sticker Creator',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue