Skip to content

Commit

Permalink
fixed site build
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Jul 2, 2024
1 parent d6da1e1 commit 5871141
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 6 additions & 3 deletions website/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"compilerOptions": {
"sourceMap": true,
"target": "ES2020",
"module": "ES2015",
"moduleResolution": "Node",
"target": "es2019",
"module": "esnext",
"moduleResolution": "node",
"allowJs": true,
"alwaysStrict": true,
"esModuleInterop": true,
"strict": true
}
}
8 changes: 3 additions & 5 deletions website/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const babelLoader = {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: ['babel-plugin-htm']
// Without import: 'preact', `h is not defined` error will occur
plugins: [['babel-plugin-htm', {'import': 'preact'}]]
}
};

Expand Down Expand Up @@ -52,10 +53,7 @@ module.exports = (env, argv) => ({
module: {
rules: [
{
test: /.m?js$/, use: babelLoader
},
{
test: /\.(ts)$/,
test: /\.(m?js|ts)$/,
exclude: /node_modules/,
use: [
babelLoader,
Expand Down

0 comments on commit 5871141

Please sign in to comment.