copy over css/fonts folder
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
import * as path from 'path';
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
import { join } from 'path';
|
||||
import * as webpack from 'webpack';
|
||||
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
|
||||
import CopyPlugin from 'copy-webpack-plugin';
|
||||
|
||||
const publicFolder = join(__dirname, 'public');
|
||||
const cssFolder = join(publicFolder, 'css');
|
||||
const fontFolder = join(publicFolder, 'fonts');
|
||||
export default (): webpack.Configuration[] => {
|
||||
const cfgs: webpack.Configuration[] = [];
|
||||
const chromeExtCfg: webpack.Configuration = {
|
||||
entry: {
|
||||
app: [path.join(__dirname, 'src', 'app.tsx')],
|
||||
app: [join(__dirname, 'src', 'app.tsx')],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
@@ -18,9 +23,17 @@ export default (): webpack.Configuration[] => {
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: path.join(__dirname, 'dist', 'chrome'),
|
||||
path: join(__dirname, 'dist', 'chrome'),
|
||||
},
|
||||
plugins: [new CleanWebpackPlugin()],
|
||||
plugins: [
|
||||
new CleanWebpackPlugin(),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{ from: cssFolder, to: 'public/css' },
|
||||
{ from: fontFolder, to: 'public/fonts' },
|
||||
],
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user