mirror of
https://github.com/Xevion/schedule-extract.git
synced 2025-12-06 03:16:23 -06:00
Webpack, manifest, build progress
This commit is contained in:
35
webpack.common.mjs
Normal file
35
webpack.common.mjs
Normal file
@@ -0,0 +1,35 @@
|
||||
import WebExtPlugin from 'web-ext-plugin';
|
||||
import path from 'path';
|
||||
import {fileURLToPath} from 'url';
|
||||
import CopyPlugin from "copy-webpack-plugin";
|
||||
import webpack from "webpack";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
export default {
|
||||
plugins: [
|
||||
new webpack.EnvironmentPlugin(['NODE_ENV']),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{from: "src/manifestFirefox.json", to: "manifest.json"},
|
||||
],
|
||||
}),
|
||||
new WebExtPlugin({})],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
exclude: /node_modules/,
|
||||
test: /\.tsx?$/,
|
||||
use: "ts-loader",
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts', '.tsx', '.js'],
|
||||
// Add `@/...` as a valid path to import from
|
||||
alias: {
|
||||
"@/": path.resolve(__dirname, "src/"),
|
||||
},
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user