Skip to content

Commit

Permalink
fix: 修复 rollup-box 引用配置错误
Browse files Browse the repository at this point in the history
  • Loading branch information
罗学 committed Apr 15, 2021
1 parent f0c4e64 commit 95f4f7f
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 35 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
},
"main": "index.js",
"devDependencies": {
"@pkb/cli": "^1.4.26",
"@pkb/cli": "^1.4.27",
"@pkb/plugin-react": "^1.4.24",
"@pkb/plugin-stylelint": "^1.4.26",
"@pkb/rollup-box": "^1.4.24",
"@pkb/webpack-box": "^1.4.24"
"@pkb/rollup-box": "^1.4.27",
"@pkb/webpack-box": "^1.4.27"
},
"bugs": {
"url": "https://github.com/luoxue-victor/learn_webpack/issues"
Expand Down
30 changes: 30 additions & 0 deletions packages/cli/template/base/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"compilerOptions": {
"baseUrl": ".",
"rootDir": ".",
"outDir": "./dist",
"sourceMap": true,
"target": "es5",
"module": "esnext",
"moduleResolution": "node",
"allowJs": false,
"noUnusedLocals": true,
"strictNullChecks": false,
"noImplicitAny": false,
"noImplicitThis": true,
"experimentalDecorators": true,
"resolveJsonModule": true,
"esModuleInterop": false,
"removeComments": false,
"jsx": "react",
"lib": ["esnext", "dom"],
"types": ["node"],
"paths": {
"@src/*": [
"src/*"
]
}
},
"include": ["**/*"],
"exclude": ["**/*.spec.ts","node_modules"]
}
7 changes: 7 additions & 0 deletions packages/cli/template/rollup/src/types/images.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
declare module '*.svg'
declare module '*.png'
declare module '*.jpg'
declare module '*.jpeg'
declare module '*.gif'
declare module '*.bmp'
declare module '*.tiff'
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/rollup-box/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path')
const fs = require('fs')
const watch = require('./build/watch')
const build = require('./build/build')
const rootConfigPath = path.join(__dirname, 'rollup-box.config.js')
const rootConfigPath = path.join(process.cwd(), 'rollup-box.config.js')
const boxConfig = fs.existsSync(rootConfigPath) ? require(rootConfigPath)() : {}

// 提供两种模式,watch 跟 rollup
Expand Down
2 changes: 0 additions & 2 deletions packages/rollup-box/plugins/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ const chalk = require('chalk')
module.exports = (config = {}) => {
const devConfig = config.dev || {}

console.log(devConfig)

process.env.NODE_ENV === 'development' && dev(Object.assign({
openPage: './index.html',
contentBase: './dist',
Expand Down
29 changes: 0 additions & 29 deletions packages/rollup-box/rollup-box.config.js

This file was deleted.

0 comments on commit 95f4f7f

Please sign in to comment.