Skip to content

Commit d2b26f0

Browse files
committed
Add tsconfig.json
1 parent b2b9e2f commit d2b26f0

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions":
4+
{
5+
"module": "ES6",
6+
"moduleResolution": "node",
7+
"sourceMap": true,
8+
"jsx" : "preserve",
9+
"target": "ES6"
10+
},
11+
"exclude": [
12+
"node_modules"
13+
]
14+
}

packages/cycle-scripts/configs/webpack.config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ process.noDeprecation = true
66

77
const webpack2Block = require('@webpack-blocks/webpack2');
88
const createConfig = webpack2Block.createConfig
9-
const defineConstants = webpack2Block.defineConstant
9+
const defineConstants = webpack2Block.defineConstants
1010
const env = webpack2Block.env
1111
const entryPoint = webpack2Block.entryPoint
1212
const setOutput = webpack2Block.setOutput
@@ -51,11 +51,11 @@ const babelConfig = {
5151
}
5252

5353
module.exports = function(language) {
54-
const ending = language === 'javascript' ? 'js' : 'ts'
54+
const ending = language === 'javascript' ? '.js' : '.ts'
5555
const baseConfig = [
5656
entryPoint(path.join(process.cwd(), 'src', 'index' + ending)),
5757
setOutput(path.join(process.cwd(), 'build', 'bundle.[hash].js')),
58-
babel(),
58+
babel(babelConfig),
5959
defineConstants({
6060
'process.env.NODE_ENV': process.env.NODE_ENV
6161
}),
@@ -85,8 +85,9 @@ module.exports = function(language) {
8585
const config = language === 'javascript' ? baseConfig : baseConfig
8686
.concat([
8787
typescript({
88+
tsconfig: path.join(__dirname, 'tsconfig.json'),
8889
useBabel: true,
89-
babelOptions: baseConfig,
90+
babelOptions: babelConfig,
9091
useCache: true,
9192
cacheDirectory: 'node_modules/.cache/at-loader'
9293
}),

packages/cycle-scripts/index.js

100644100755
File mode changed.

packages/cycle-scripts/scripts/start.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function run (port) {
6969
}
7070
)
7171

72-
const devServer = new WebpackDevServer(compiler, devServerConfig)
72+
const devServer = new WebpackDevServer(compiler)
7373

7474
devServer.listen(port, err => {
7575
if (err) {

0 commit comments

Comments
 (0)