Skip to content

Commit

Permalink
chore: 컴파일 환경 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
zereight(doby) committed Oct 21, 2021
1 parent db4a63f commit 45e4586
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 34 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simple-react-query",
"version": "0.0.4",
"version": "0.0.10",
"description": "Use react query lightly.",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
19 changes: 8 additions & 11 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"allowJs": true,
"jsx": "react-jsx",
"sourceMap": true,
"outDir": "./dist",
"strict": true,
"moduleResolution": "node",
"module": "commonjs",
"target": "esnext",
"lib": ["es6", "dom", "es2016", "es2017", "ESNext"],
"jsx": "react",
"sourceMap": true,
"declaration": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"noImplicitAny": true,
"strictNullChecks": true,
"noImplicitReturns": true
"noImplicitAny": true,
"removeComments": true,
"typeRoots": ["index.d.ts", "node_modules/@types"]
},
"include": ["./src/**/*"]
}
34 changes: 12 additions & 22 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");

module.exports = {
entry: ["./src/index.ts"],
const config = {
entry: "./src/index.ts",
output: {
path: path.resolve(__dirname, "dist/js"),
filename: "bundle.js",
path: path.resolve(__dirname, "dist"),
filename: "index.js",
clean: true
},
module: {
rules: [
{
test: /.(tsx|ts|js|jsx)$/,
test: /\.(ts|tsx|js|jsx)$/,
use: [
{
loader: "babel-loader",
Expand All @@ -26,29 +25,20 @@ module.exports = {
],
"@babel/preset-typescript"
],
plugins: ["@babel/plugin-transform-runtime"]
plugins: ["@babel/transform-runtime"]
}
}
],
exclude: /node_modules/
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: "./public/index.html"
})
],
plugins: [],
resolve: {
extensions: [".ts", ".tsx", ".js", ".jsx", "css", "scss"]
extensions: [".tsx", ".ts", ".jsx", ".js"]
},
devtool: "source-map",
mode: "development",
devServer: {
host: "localhost",
port: 3000,
historyApiFallback: true,
open: true,
hot: true
}
mode: "production",
devtool: "source-map"
};

module.exports = config;

0 comments on commit 45e4586

Please sign in to comment.