-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42cc51a
commit d59183f
Showing
6 changed files
with
40 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
src/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "./node_modules/@tubeu/configs-tsconfig/dist/tsconfig.build.json", | ||
"compilerOptions": { | ||
"plugins": [{ "name": "typescript-plugin-css-modules" }], | ||
"noEmit": true | ||
}, | ||
"include": ["src"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,5 @@ | ||
import "dotenv/config" | ||
import * as path from "path" | ||
import * as webpack from "webpack" | ||
import HtmlWebpackPlugin from "html-webpack-plugin" | ||
import MiniCssExtractPlugin from "mini-css-extract-plugin" | ||
import "webpack-dev-server" | ||
import { generateWebpackConfig } from "@tubeu/configs-webpack" | ||
|
||
const mode = process.env.NODE_ENV! as "development" | "production" | ||
const port = process.env.PORT || 3000 | ||
|
||
const config: webpack.Configuration = { | ||
mode, | ||
entry: "./src/index.tsx", | ||
output: { | ||
path: path.resolve(__dirname, process.env.outDir!), | ||
filename: "bundle.js", | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(ts|tsx|js|jsx)$/, | ||
exclude: /node_modules/, | ||
use: { | ||
loader: "babel-loader", | ||
}, | ||
}, | ||
{ | ||
test: /\.s[ac]ss$/i, | ||
use: ["style-loader", "css-loader", "sass-loader"], | ||
}, | ||
], | ||
}, | ||
devServer: { | ||
static: { | ||
directory: path.join(__dirname, process.env.outDir!), | ||
}, | ||
open: true, | ||
port, | ||
}, | ||
resolve: { | ||
extensions: [".tsx", ".jsx", ".ts", ".js"], | ||
}, | ||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
template: "./public/index.html", | ||
publicUrl: process.env.PUBLIC_URL!, | ||
}), | ||
new MiniCssExtractPlugin(), | ||
new webpack.ProvidePlugin({ | ||
process: "process/browser", | ||
}), | ||
], | ||
} | ||
const config = { ...generateWebpackConfig({}) } | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters