Comments (3)
.babelrc
{ "plugins": [ "transform-decorators-legacy", "transform-class-properties", "transform-object-rest-spread", "transform-object-assign", [ "transform-runtime", { "helpers": false, "polyfill": false, "regenerator": true, "moduleName": "babel-runtime" } ] ], "presets": [ "react", "stage-0", "es2015" ] }
package.json
{ "name": "site", "version": "0.0.1", "private": true, "scripts": { "start": "docsite start", "build": "docsite build" }, "devDependencies": { "docsite": "^1.1.0", "babel-core": "6.23.1", "babel-eslint": "^6.0.5", "babel-loader": "6.4.0", "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-plugin-transform-object-assign": "^6.22.0", "babel-plugin-transform-object-rest-spread": "^6.23.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-es2015": "6.22.0", "babel-preset-react": "6.23.0", "babel-preset-stage-0": "6.22.0", "babel-register": "^6.26.0", "css-loader": "0.6.12", "eslint": "^3.6.0", "eslint-config-ali": "^1.0.0", "eslint-plugin-import": "*", "eslint-plugin-react": "*", "extract-text-webpack-plugin": "^2.1.2", "gulp": "3.9.1", "gulp-util": "2.2.20", "json-loader": "*", "node-libs-browser": "2.0.0", "node-sass": "^4.7.2", "opn": "^5.3.0", "raw-loader": "^0.5.1", "react": "16.5.2", "react-dom": "16.5.2", "sass-loader": "6.0.2", "style-loader": "0.6.5", "webpack": "^2.6.1", "webpack-dev-server": "^2.4.5" }, "dependencies": { "classnames": "^2.2.5", "core-decorators": "^0.20.0", "js-cookie": "^2.2.0", "react": "^16.5.2", "react-dom": "^16.5.2", "react-scroll": "^1.7.9", "react-tilt": "^0.1.4", "whatwg-fetch": "^2.0.4" } }
webpack.config.js
`const path = require('path');
const fs = require('fs');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const entry = {};
const targetPath = path.join(__dirname, './src/pages');
fs.readdirSync(targetPath).forEach(page => {
if (
fs.statSync(path.join(targetPath, page)).isDirectory() &&
fs.existsSync(path.join(targetPath, page, 'index.jsx'))
) {
entry[page] = path.join(targetPath, page, 'index.jsx');
}
});
module.exports = {
entry,
output: {
path: path.join(__dirname, 'build'),
filename: '[name].js',
},
externals: {
react: 'React',
'react-dom': 'ReactDOM',
},
module: {
loaders: [
{
test: /.js|jsx$/,
exclude: [/node_modules/, /build/lib/, /.min.js$/],
use: 'babel-loader',
},
{
test: /.(s)?css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader', 'sass-loader'],
}),
},
{
test: /.json?$/,
exclude: /node_modules/,
use: 'json-loader',
},
],
},
resolve: {
extensions: ['.js', '.jsx', '.json'],
},
plugins: [
new webpack.NoEmitOnErrorsPlugin(),
new webpack.optimize.OccurrenceOrderPlugin(),
new ExtractTextPlugin('[name].css'),
],
};
`
from docsite.
降到node10
好了
from docsite.
遇到同样问题,只能降级node么?搜到一个类似问题 说是node 12 和 gulp 4冲突,是否可以考虑升级?
from docsite.
Related Issues (20)
- Multilingual collaboration support
- docsite 安装完查看版本报错 lib下 文件 HOT 10
- docsite 2.0特性
- 参考教程报错,麻烦查一下原因,谢谢 HOT 7
- [报错] Mac pro 按照官方文档教程操作报错 HOT 3
- 增加对流程图、甘特图、时许图插件 https://mermaidjs.github.io/ 的支持 HOT 2
- 增加markdown对echarts插件的支持 HOT 3
- 使用案例 HOT 4
- windows安装docsite 后,无docsite命令
- 是否可以多层级的文档,目前只支持三层级 HOT 2
- 依赖重复报警告(dependencies和devDependencies) HOT 2
- 初始化完成后,启动报错 HOT 11
- node版本14、13、9 启动报错 HOT 3
- Google analytics HOT 2
- docsite无法build,提示:Version 9 of Highlight.js has reached EOL and is no longer supported. HOT 1
- npm ERR! code ERESOLVE HOT 2
- the website isn't update. HOT 2
- Can't start the project after the init project successfully HOT 1
- Mac系统安装不成功 mac 11.6.1系统 HOT 4
- Suggestion to have a pretty decent Frontend for your docsite.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docsite.