英文:
Module not found for package dependency
问题
当使用Webpack编译时,我遇到了以下错误。我在package.json中没有swiper,但它被我的一个依赖项使用。Swiper和所有25个模块的错误都像下面这样存在于我的node_modules文件夹中:
编译时出现问题:
ERROR in ./node_modules/myDependencyPackage/index.js
找不到模块: 错误: 无法从包c:...\myAppFolder\node_modules\swiper的exports字段中导出包路径./react/swiper-react.js(请查看c:...\myAppFolder\node_modules\swiper\package.json中的exports字段)
这是我的一些环境信息:
环境:
- NodeJS 16
- React 17.0.2
- Webpack ^5.88.0
- Swiper 8.4.7
tsconfig.json
{
"compilerOptions": {
"baseUrl": "./src",
"strict": false,
"outDir": "./dist/",
"sourceMap": true,
"module": "esnext",
"target": "es6",
"jsx": "react",
"allowJs": false,
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"listEmittedFiles": false,
"listFiles": false,
"lib": ["dom", "dom.iterable", "esnext"],
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": false,
"moduleResolution": "node",
"resolveJsonModule": true,
"noEmit": false,
"isolatedModules": false,
"paths": {
"src": ["src"]
}
},
"exclude": ["node_modules", "dist"],
"include": ["src"]
}
webpack.js
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require("copy-webpack-plugin");
const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
const webpack = require('webpack');
const path = require('path');
const ROOT_PATH = path.resolve(__dirname);
const gitRevisionPlugin = new GitRevisionPlugin({ commithashCommand: 'rev-parse --short HEAD' });
module.exports = {
mode: 'development',
devtool: 'source-map',
devServer: {
compress: true,
port: 8000,
historyApiFallback: true,
open: true
},
entry: {
index: ['babel-polyfill', './src/index.tsx']
},
output: {
path: path.resolve(ROOT_PATH, './public/build'),
filename: '[name].[contenthash].js',
publicPath: '/'
},
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
alias: {
'src': path.resolve(__dirname, 'src/')
},
fallback: {
crypto: require.resolve("crypto-browserify"),
stream: require.resolve("stream-browserify"),
vm: require.resolve("vm-browserify")
}
},
module: {
rules: [
{
test: /\.(ts|tsx)$/,
use: [
{
loader: 'babel-loader'
},
{
loader: 'ts-loader',
options: {
transpileOnly: false,
happyPackMode: false
}
}
]
},
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
{
test: /\.s[ac]ss$/i,
use: ["style-loader", "css-loader", "sass-loader",],
},
{
test: /\.md$/,
use: ['html!markdown-loader']
},
{
test: /\.svg$/,
use: ['svg-inline-loader']
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/i,
type: 'asset/resource',
},
{
test: /\.(png|jpg|jpeg|gif|mp3)$/i,
type: 'asset/resource',
},
]
},
plugins: [
new HtmlWebpackPlugin({
template: './public/index.html',
filename: './index.html',
}),
new CopyPlugin({
patterns: [
{
from: './appsettings.json',
to: './appsettings.json'
},
{
from: './public/favicon.ico',
to: './favicon.ico'
}]
}),
gitRevisionPlugin,
new webpack.DefinePlugin({
'process.env.COMMITHASH': JSON.stringify(gitRevisionPlugin.commithash()),
'process.env.BRANCH': JSON.stringify(gitRevisionPlugin.branch()),
}),
]
};
我尝试的解决方案:
- 在我的package.json中添加swiper
- 在我的应用程序中添加import或调用require方法
- 在我的tsconfig.json或webpack.js上测试不同的配置
- 清理模块
- 删除你的node_modules文件夹(rm -rf node_modules)
- npm cache clean -f
- npm install
- npm install firebase-admin
- 通过在我的package.json中升级或降级来覆盖swiper版本
[编辑]
为了测试,我尝试编辑我的node_modules中swiper的package.json并修复问题。但我们都知道在node_modules中编辑文件不是解决方案。我在exports行中添加了如下内容:
"./react/swiper-react.js": "./react/swiper-react.js"
完整的swiper package.json
{
"name": "swiper",
"version": "8.4.7",
"description": "Most modern mobile touch slider and framework with hardware accelerated transitions",
"typings": "swiper.d.ts",
"type": "module",
"main": "./swiper.esm.js",
"module": "./swiper.esm.js",
"svelte": "./swiper.esm.js",
"exports": {
".": "./swiper.esm.js",
"./core": "./swiper.esm.js",
"./swiper.esm.js": "./swiper.esm.js",
"./bundle": "./swiper-bundle.esm.js",
"./swiper-bundle.esm.js": "./swiper-bundle.esm.js",
"./css": "./swiper.min.css",
"./swiper.min.css": "./swiper.min.css",
"./swiper.css": "./swiper.css",
"./css/bundle": "./swiper-bundle.min.css",
"./swiper-bundle.min.css": "./swiper-bundle.min.css",
"./swiper-bundle.css": "./swiper-bundle.css",
"./css/a11y": "./modules/a11y/a11y.min.css",
"./css/autoplay": "./modules/autoplay/autoplay.min.css",
"./css/controller": "./modules/controller/controller.min.css",
<details>
<summary>英文:</summary>
When compile with webpack i have the error below.
I do not have swiper in my **package.json** but it used by one of my dependency.
Swiper and all 25 modules error like one below are existing in my **node_modules** folder
> Compiled with problems:
>
> ERROR in ./node_modules/myDependencyPackage/index.js
> Module not found: Error: Package path ./react/swiper-react.js is not exported from package c:\...\myAppFolder\node_modules\swiper (see exports field in c:\...\myAppFolder\node_modules\swiper\package.json)
Here some of my environement informations
**environement:**
- NodeJS 16
- React 17.0.2
- Webpack ^5.88.0
- Swiper 8.4.7
**tsconfig.json**
{
"compilerOptions": {
"baseUrl": "./src",
"strict": false,
"outDir": "./dist/",
"sourceMap": true,
"module": "esnext",
"target": "es6",
"jsx": "react",
"allowJs": false,
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"listEmittedFiles": false,
"listFiles": false,
"lib": ["dom", "dom.iterable", "esnext"],
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": false,
"moduleResolution": "node",
"resolveJsonModule": true,
"noEmit": false,
"isolatedModules": false,
"paths": {
"src": ["src"]
}
},
"exclude": ["node_modules", "dist"],
"include": ["src"]
}
**webpack.js**
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require("copy-webpack-plugin");
const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
const webpack = require('webpack');
const path = require('path');
const ROOT_PATH = path.resolve(__dirname);
const gitRevisionPlugin = new GitRevisionPlugin({ commithashCommand: 'rev-parse --short HEAD' });
module.exports = {
mode: 'development',
devtool: 'source-map',
devServer: {
compress: true,
port: 8000,
historyApiFallback: true,
open: true
},
entry: {
index: ['babel-polyfill', './src/index.tsx']
},
output: {
path: path.resolve(ROOT_PATH, './public/build'),
filename: '[name].[contenthash].js',
publicPath: '/'
},
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
alias: {
'src': path.resolve(__dirname, 'src/')
},
fallback: {
crypto: require.resolve("crypto-browserify"),
stream: require.resolve("stream-browserify"),
vm: require.resolve("vm-browserify")
}
},
module: {
rules: [
{
test: /.(ts|tsx)$/,
use: [
{
loader: 'babel-loader'
},
{
loader: 'ts-loader',
options: {
transpileOnly: false,
happyPackMode: false
}
}
]
},
{
test: /.css$/i,
use: ["style-loader", "css-loader"],
},
{
test: /.s[ac]ss$/i,
use: ["style-loader", "css-loader", "sass-loader",],
},
{
test: /.md$/,
use: ['html!markdown-loader']
},
{
test: /.svg$/,
use: ['svg-inline-loader']
},
{
test: /.(woff|woff2|eot|ttf|otf)$/i,
type: 'asset/resource',
},
{
test: /.(png|jpg|jpeg|gif|mp3)$/i,
type: 'asset/resource',
},
]
},
plugins: [
new HtmlWebpackPlugin({
template: './public/index.html',
filename: './index.html',
}),
new CopyPlugin({
patterns: [
{
from: './appsettings.json',
to: './appsettings.json'
},
{
from: './public/favicon.ico',
to: './favicon.ico'
}]
}),
gitRevisionPlugin,
new webpack.DefinePlugin({
'process.env.COMMITHASH': JSON.stringify(gitRevisionPlugin.commithash()),
'process.env.BRANCH': JSON.stringify(gitRevisionPlugin.branch()),
}),
]
};
Solution i try
- adding swiper into my **package.json**
- adding **import** or call **require** method in my app
- testing different configuration on my **tsconfig.json** or **webpack.js**
- clean modules
- Remove your node_modules folder (rm -rf node_modules)
- npm cache clean -f
- npm install
- npm install firebase-admin
- override swiper version by upgrade or downgrade in my own **package.json**
[EDIT]
------
For test, i try to edit **package.json** of swiper in my **node_modules** and fix issues.
But we all know that editing files in node_modules is not a solution.
I added in **exports** line like this
"./react/swiper-react.js": "./react/swiper-react.js"
**full swiper package.json**
{
"name": "swiper",
"version": "8.4.7",
"description": "Most modern mobile touch slider and framework with hardware accelerated transitions",
"typings": "swiper.d.ts",
"type": "module",
"main": "./swiper.esm.js",
"module": "./swiper.esm.js",
"svelte": "./swiper.esm.js",
"exports": {
".": "./swiper.esm.js",
"./core": "./swiper.esm.js",
"./swiper.esm.js": "./swiper.esm.js",
"./bundle": "./swiper-bundle.esm.js",
"./swiper-bundle.esm.js": "./swiper-bundle.esm.js",
"./css": "./swiper.min.css",
"./swiper.min.css": "./swiper.min.css",
"./swiper.css": "./swiper.css",
"./css/bundle": "./swiper-bundle.min.css",
"./swiper-bundle.min.css": "./swiper-bundle.min.css",
"./swiper-bundle.css": "./swiper-bundle.css",
"./css/a11y": "./modules/a11y/a11y.min.css",
"./css/autoplay": "./modules/autoplay/autoplay.min.css",
"./css/controller": "./modules/controller/controller.min.css",
"./css/effect-coverflow": "./modules/effect-coverflow/effect-coverflow.min.css",
"./css/effect-cube": "./modules/effect-cube/effect-cube.min.css",
"./css/effect-fade": "./modules/effect-fade/effect-fade.min.css",
"./css/effect-flip": "./modules/effect-flip/effect-flip.min.css",
"./css/effect-creative": "./modules/effect-creative/effect-creative.min.css",
"./css/effect-cards": "./modules/effect-cards/effect-cards.min.css",
"./css/free-mode": "./modules/free-mode/free-mode.min.css",
"./css/grid": "./modules/grid/grid.min.css",
"./css/hash-navigation": "./modules/hash-navigation/hash-navigation.min.css",
"./css/history": "./modules/history/history.min.css",
"./css/keyboard": "./modules/keyboard/keyboard.min.css",
"./css/lazy": "./modules/lazy/lazy.min.css",
"./css/manipulation": "./modules/manipulation/manipulation.min.css",
"./css/mousewheel": "./modules/mousewheel/mousewheel.min.css",
"./css/navigation": "./modules/navigation/navigation.min.css",
"./css/pagination": "./modules/pagination/pagination.min.css",
"./css/parallax": "./modules/parallax/parallax.min.css",
"./css/scrollbar": "./modules/scrollbar/scrollbar.min.css",
"./css/thumbs": "./modules/thumbs/thumbs.min.css",
"./css/virtual": "./modules/virtual/virtual.min.css",
"./css/zoom": "./modules/zoom/zoom.min.css",
"./less": "./swiper.less",
"./less/a11y": "./modules/a11y/a11y.less",
"./less/autoplay": "./modules/autoplay/autoplay.less",
"./less/controller": "./modules/controller/controller.less",
"./less/effect-coverflow": "./modules/effect-coverflow/effect-coverflow.less",
"./less/effect-cube": "./modules/effect-cube/effect-cube.less",
"./less/effect-fade": "./modules/effect-fade/effect-fade.less",
"./less/effect-flip": "./modules/effect-flip/effect-flip.less",
"./less/effect-creative": "./modules/effect-creative/effect-creative.less",
"./less/effect-cards": "./modules/effect-cards/effect-cards.less",
"./less/free-mode": "./modules/free-mode/free-mode.less",
"./less/grid": "./modules/grid/grid.less",
"./less/hash-navigation": "./modules/hash-navigation/hash-navigation.less",
"./less/history": "./modules/history/history.less",
"./less/keyboard": "./modules/keyboard/keyboard.less",
"./less/lazy": "./modules/lazy/lazy.less",
"./less/manipulation": "./modules/manipulation/manipulation.less",
"./less/mousewheel": "./modules/mousewheel/mousewheel.less",
"./less/navigation": "./modules/navigation/navigation.less",
"./less/pagination": "./modules/pagination/pagination.less",
"./less/parallax": "./modules/parallax/parallax.less",
"./less/scrollbar": "./modules/scrollbar/scrollbar.less",
"./less/thumbs": "./modules/thumbs/thumbs.less",
"./less/virtual": "./modules/virtual/virtual.less",
"./less/zoom": "./modules/zoom/zoom.less",
"./scss": "./swiper.scss",
"./scss/a11y": "./modules/a11y/a11y.scss",
"./scss/autoplay": "./modules/autoplay/autoplay.scss",
"./scss/controller": "./modules/controller/controller.scss",
"./scss/effect-coverflow": "./modules/effect-coverflow/effect-coverflow.scss",
"./scss/effect-cube": "./modules/effect-cube/effect-cube.scss",
"./scss/effect-fade": "./modules/effect-fade/effect-fade.scss",
"./scss/effect-flip": "./modules/effect-flip/effect-flip.scss",
"./scss/effect-creative": "./modules/effect-creative/effect-creative.scss",
"./scss/effect-cards": "./modules/effect-cards/effect-cards.scss",
"./scss/free-mode": "./modules/free-mode/free-mode.scss",
"./scss/grid": "./modules/grid/grid.scss",
"./scss/hash-navigation": "./modules/hash-navigation/hash-navigation.scss",
"./scss/history": "./modules/history/history.scss",
"./scss/keyboard": "./modules/keyboard/keyboard.scss",
"./scss/lazy": "./modules/lazy/lazy.scss",
"./scss/manipulation": "./modules/manipulation/manipulation.scss",
"./scss/mousewheel": "./modules/mousewheel/mousewheel.scss",
"./scss/navigation": "./modules/navigation/navigation.scss",
"./scss/pagination": "./modules/pagination/pagination.scss",
"./scss/parallax": "./modules/parallax/parallax.scss",
"./scss/scrollbar": "./modules/scrollbar/scrollbar.scss",
"./scss/thumbs": "./modules/thumbs/thumbs.scss",
"./scss/virtual": "./modules/virtual/virtual.scss",
"./scss/zoom": "./modules/zoom/zoom.scss",
"./angular": "./angular/fesm2015/swiper_angular.mjs",
"./react": "./react/swiper-react.js",
"./vue": "./vue/swiper-vue.js",
"./solid": "./solid/swiper-solid.js",
"./svelte": "./svelte/swiper-svelte.js",
"./types": "./types/index.d.ts",
"./package.json": "./package.json"
},
"typesVersions": {
"*": {
"angular": [
"angular/swiper_angular.d.ts"
],
"react": [
"react/swiper-react.d.ts"
],
"svelte": [
"svelte/swiper-svelte.d.ts"
],
"solid": [
"solid/swiper-solid.d.ts"
],
"vue": [
"vue/swiper-vue.d.ts"
]
}
},
"scripts": {
"postinstall": "node -e "try{require('./postinstall')}catch(e){}""
},
"repository": {
"type": "git",
"url": "https://github.com/nolimits4web/Swiper.git"
},
"keywords": [
"swiper",
"swipe",
"slider",
"touch",
"ios",
"mobile",
"cordova",
"phonegap",
"app",
"framework",
"framework7",
"carousel",
"gallery",
"plugin",
"react",
"solid-js",
"vue",
"angular",
"svelte",
"slideshow"
],
"author": "Vladimir Kharlampidi",
"license": "MIT",
"bugs": {
"url": "https://github.com/nolimits4web/swiper/issues"
},
"homepage": "https://swiperjs.com",
"funding": [
{
"type": "patreon",
"url": "https://www.patreon.com/swiperjs"
},
{
"type": "open_collective",
"url": "http://opencollective.com/swiper"
}
],
"engines": {
"node": ">= 4.7.0"
},
"dependencies": {
"dom7": "^4.0.4",
"ssr-window": "^4.0.2"
}
}
</details>
# 答案1
**得分**: 0
webpack配置中使用别名解析找到的解决方案。
```javascript
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
alias: {
'src': path.resolve(__dirname, 'src/'),
'swiper/react/swiper-react.js': path.resolve(__dirname, 'node_modules/swiper/react/swiper-react.js'),
'swiper/modules/a11y/a11y.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/a11y/a11y.min.css'),
'swiper/modules/autoplay/autoplay.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/autoplay/autoplay.min.css'),
'swiper/modules/controller/controller.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/controller/controller.min.css'),
'swiper/modules/effect-coverflow/effect-coverflow.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/effect-coverflow/effect-coverflow.min.css'),
'swiper/modules/effect-cube/effect-cube.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/effect-cube/effect-cube.min.css'),
'swiper/modules/effect-fade/effect-fade.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/effect-fade/effect-fade.min.css'),
'swiper/modules/effect-flip/effect-flip.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/effect-flip/effect-flip.min.css'),
'swiper/modules/effect-creative/effect-creative.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/effect-creative/effect-creative.min.css'),
'swiper/modules/free-mode/free-mode.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/free-mode/free-mode.min.css'),
'swiper/modules/grid/grid.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/grid/grid.min.css'),
'swiper/modules/hash-navigation/hash-navigation.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/hash-navigation/hash-navigation.min.css'),
'swiper/modules/history/history.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/history/history.min.css'),
'swiper/modules/keyboard/keyboard.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/keyboard/keyboard.min.css'),
'swiper/modules/lazy/lazy.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/lazy/lazy.min.css'),
'swiper/modules/manipulation/manipulation.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/manipulation/manipulation.min.css'),
'swiper/modules/mousewheel/mousewheel.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/mousewheel/mousewheel.min.css'),
'swiper/modules/navigation/navigation.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/navigation/navigation.min.css'),
'swiper/modules/pagination/pagination.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/pagination/pagination.min.css'),
'swiper/modules/parallax/parallax.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/parallax/parallax.min.css'),
'swiper/modules/scrollbar/scrollbar.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/scrollbar/scrollbar.min.css'),
'swiper/modules/thumbs/thumbs.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/thumbs/thumbs.min.css'),
'swiper/modules/virtual/virtual.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/virtual/virtual.min.css'),
'swiper/modules/zoom/zoom.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/zoom/zoom.min.css'),
'swiper/modules/effect-cards/effect-cards.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/effect-cards/effect-cards.min.css'),
},
}
英文:
Solution found with alias resolve in webpack configuration.
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
alias: {
'src': path.resolve(__dirname, 'src/'),
'swiper/react/swiper-react.js': path.resolve(__dirname, 'node_modules/swiper/react/swiper-react.js'),
'swiper/modules/a11y/a11y.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/a11y/a11y.min.css'),
'swiper/modules/autoplay/autoplay.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/autoplay/autoplay.min.css'),
'swiper/modules/controller/controller.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/controller/controller.min.css'),
'swiper/modules/effect-coverflow/effect-coverflow.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/effect-coverflow/effect-coverflow.min.css'),
'swiper/modules/effect-cube/effect-cube.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/effect-cube/effect-cube.min.css'),
'swiper/modules/effect-fade/effect-fade.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/effect-fade/effect-fade.min.css'),
'swiper/modules/effect-flip/effect-flip.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/effect-flip/effect-flip.min.css'),
'swiper/modules/effect-creative/effect-creative.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/effect-creative/effect-creative.min.css'),
'swiper/modules/free-mode/free-mode.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/free-mode/free-mode.min.css'),
'swiper/modules/grid/grid.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/grid/grid.min.css'),
'swiper/modules/hash-navigation/hash-navigation.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/hash-navigation/hash-navigation.min.css'),
'swiper/modules/history/history.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/history/history.min.css'),
'swiper/modules/keyboard/keyboard.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/keyboard/keyboard.min.css'),
'swiper/modules/lazy/lazy.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/lazy/lazy.min.css'),
'swiper/modules/manipulation/manipulation.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/manipulation/manipulation.min.css'),
'swiper/modules/mousewheel/mousewheel.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/mousewheel/mousewheel.min.css'),
'swiper/modules/navigation/navigation.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/navigation/navigation.min.css'),
'swiper/modules/pagination/pagination.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/pagination/pagination.min.css'),
'swiper/modules/parallax/parallax.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/parallax/parallax.min.css'),
'swiper/modules/scrollbar/scrollbar.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/scrollbar/scrollbar.min.css'),
'swiper/modules/thumbs/thumbs.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/thumbs/thumbs.min.css'),
'swiper/modules/virtual/virtual.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/virtual/virtual.min.css'),
'swiper/modules/zoom/zoom.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/zoom/zoom.min.css'),
'swiper/modules/effect-cards/effect-cards.min.css': path.resolve(__dirname, 'node_modules/swiper/modules/effect-cards/effect-cards.min.css'),
},
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论