Skip to content

Commit

Permalink
chore: Update tools
Browse files Browse the repository at this point in the history
  • Loading branch information
nuintun committed Nov 1, 2024
1 parent 3454f84 commit 2b53c96
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @description 应用配置
*/

import path from 'path';
import path from 'node:path';

const js = path.resolve('app/js');
const css = path.resolve('app/css');
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @module server
*/

import fs from 'fs';
import Koa from 'koa';
import fs from 'node:fs';
import dayjs from 'dayjs';
import files from 'koa-files';
import compress from 'koa-compress';
Expand Down
2 changes: 1 addition & 1 deletion svgo.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @description Svgo 配置
*/

import { createHash } from 'crypto';
import { createHash } from 'node:crypto';

/**
* @type {import('./tools/interface').SvgoConfig}
Expand Down
4 changes: 2 additions & 2 deletions tools/bin/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*/

import webpack from 'webpack';
import { join, resolve } from 'path';
import { readdir } from 'fs/promises';
import { join, resolve } from 'node:path';
import resolveRules from '../lib/rules.js';
import { readdir } from 'node:fs/promises';
import appConfig from '../../app.config.js';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
Expand Down
2 changes: 1 addition & 1 deletion tools/lib/ip.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @description 获取本机 IP 地址
*/

import os from 'os';
import os from 'node:os';

/**
* @function isLinkLocal
Expand Down
4 changes: 2 additions & 2 deletions tools/lib/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* @description 解析 browserslist 配置
*/

import { resolve } from 'path';
import { readFile } from 'fs/promises';
import { resolve } from 'node:path';
import { readFile } from 'node:fs/promises';

// 默认配置
const defaultConfig = resolve('.browserslistrc');
Expand Down

0 comments on commit 2b53c96

Please sign in to comment.