mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add tslib to TS compiler
- using tslib reduces bundle sizes - add compiler option for easier default imports of CJS modules - remove double entry of fork-ts-checker-plugin - speed up hot reload by using exprimental ts-loader API
This commit is contained in:
parent
7e773e2d5e
commit
84e431d377
16
package.json
16
package.json
@ -34,7 +34,7 @@
|
|||||||
"expose-loader": "^0.7.3",
|
"expose-loader": "^0.7.3",
|
||||||
"extract-text-webpack-plugin": "^4.0.0-beta.0",
|
"extract-text-webpack-plugin": "^4.0.0-beta.0",
|
||||||
"file-loader": "^1.1.11",
|
"file-loader": "^1.1.11",
|
||||||
"fork-ts-checker-webpack-plugin": "^0.4.1",
|
"fork-ts-checker-webpack-plugin": "^0.4.2",
|
||||||
"gaze": "^1.1.2",
|
"gaze": "^1.1.2",
|
||||||
"glob": "~7.0.0",
|
"glob": "~7.0.0",
|
||||||
"grunt": "1.0.1",
|
"grunt": "1.0.1",
|
||||||
@ -71,12 +71,14 @@
|
|||||||
"karma-webpack": "^3.0.0",
|
"karma-webpack": "^3.0.0",
|
||||||
"lint-staged": "^6.0.0",
|
"lint-staged": "^6.0.0",
|
||||||
"load-grunt-tasks": "3.5.2",
|
"load-grunt-tasks": "3.5.2",
|
||||||
|
"mini-css-extract-plugin": "^0.4.0",
|
||||||
"mobx-react-devtools": "^4.2.15",
|
"mobx-react-devtools": "^4.2.15",
|
||||||
"mocha": "^4.0.1",
|
"mocha": "^4.0.1",
|
||||||
"ng-annotate-loader": "^0.6.1",
|
"ng-annotate-loader": "^0.6.1",
|
||||||
"ng-annotate-webpack-plugin": "^0.2.1-pre",
|
"ng-annotate-webpack-plugin": "^0.2.1-pre",
|
||||||
"ngtemplate-loader": "^2.0.1",
|
"ngtemplate-loader": "^2.0.1",
|
||||||
"npm": "^5.4.2",
|
"npm": "^5.4.2",
|
||||||
|
"optimize-css-assets-webpack-plugin": "^4.0.2",
|
||||||
"phantomjs-prebuilt": "^2.1.15",
|
"phantomjs-prebuilt": "^2.1.15",
|
||||||
"postcss-browser-reporter": "^0.5.0",
|
"postcss-browser-reporter": "^0.5.0",
|
||||||
"postcss-loader": "^2.0.6",
|
"postcss-loader": "^2.0.6",
|
||||||
@ -90,15 +92,16 @@
|
|||||||
"style-loader": "^0.21.0",
|
"style-loader": "^0.21.0",
|
||||||
"systemjs": "0.20.19",
|
"systemjs": "0.20.19",
|
||||||
"systemjs-plugin-css": "^0.1.36",
|
"systemjs-plugin-css": "^0.1.36",
|
||||||
"ts-loader": "^4.3.0",
|
|
||||||
"ts-jest": "^22.4.6",
|
"ts-jest": "^22.4.6",
|
||||||
|
"ts-loader": "^4.3.0",
|
||||||
|
"tslib": "^1.9.3",
|
||||||
"tslint": "^5.8.0",
|
"tslint": "^5.8.0",
|
||||||
"tslint-loader": "^3.5.3",
|
"tslint-loader": "^3.5.3",
|
||||||
"typescript": "^2.6.2",
|
"typescript": "^2.6.2",
|
||||||
|
"uglifyjs-webpack-plugin": "^1.2.7",
|
||||||
"webpack": "^4.8.0",
|
"webpack": "^4.8.0",
|
||||||
"webpack-bundle-analyzer": "^2.9.0",
|
"webpack-bundle-analyzer": "^2.9.0",
|
||||||
"webpack-cleanup-plugin": "^0.5.1",
|
"webpack-cleanup-plugin": "^0.5.1",
|
||||||
"fork-ts-checker-webpack-plugin": "^0.4.2",
|
|
||||||
"webpack-cli": "^2.1.4",
|
"webpack-cli": "^2.1.4",
|
||||||
"webpack-dev-server": "^3.1.0",
|
"webpack-dev-server": "^3.1.0",
|
||||||
"webpack-merge": "^4.1.0",
|
"webpack-merge": "^4.1.0",
|
||||||
@ -155,14 +158,12 @@
|
|||||||
"immutable": "^3.8.2",
|
"immutable": "^3.8.2",
|
||||||
"jquery": "^3.2.1",
|
"jquery": "^3.2.1",
|
||||||
"lodash": "^4.17.10",
|
"lodash": "^4.17.10",
|
||||||
"mini-css-extract-plugin": "^0.4.0",
|
|
||||||
"mobx": "^3.4.1",
|
"mobx": "^3.4.1",
|
||||||
"mobx-react": "^4.3.5",
|
"mobx-react": "^4.3.5",
|
||||||
"mobx-state-tree": "^1.3.1",
|
"mobx-state-tree": "^1.3.1",
|
||||||
"moment": "^2.22.2",
|
"moment": "^2.22.2",
|
||||||
"mousetrap": "^1.6.0",
|
"mousetrap": "^1.6.0",
|
||||||
"mousetrap-global-bind": "^1.1.0",
|
"mousetrap-global-bind": "^1.1.0",
|
||||||
"optimize-css-assets-webpack-plugin": "^4.0.2",
|
|
||||||
"prismjs": "^1.6.0",
|
"prismjs": "^1.6.0",
|
||||||
"prop-types": "^15.6.0",
|
"prop-types": "^15.6.0",
|
||||||
"react": "^16.2.0",
|
"react": "^16.2.0",
|
||||||
@ -181,10 +182,9 @@
|
|||||||
"slate-react": "^0.12.4",
|
"slate-react": "^0.12.4",
|
||||||
"tether": "^1.4.0",
|
"tether": "^1.4.0",
|
||||||
"tether-drop": "https://github.com/torkelo/drop/tarball/master",
|
"tether-drop": "https://github.com/torkelo/drop/tarball/master",
|
||||||
"tinycolor2": "^1.4.1",
|
"tinycolor2": "^1.4.1"
|
||||||
"uglifyjs-webpack-plugin": "^1.2.7"
|
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"caniuse-db": "1.0.30000772"
|
"caniuse-db": "1.0.30000772"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -20,6 +20,7 @@ module.exports = merge(common, {
|
|||||||
path: path.resolve(__dirname, '../../public/build'),
|
path: path.resolve(__dirname, '../../public/build'),
|
||||||
filename: '[name].[hash].js',
|
filename: '[name].[hash].js',
|
||||||
publicPath: "/public/build/",
|
publicPath: "/public/build/",
|
||||||
|
pathinfo: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
@ -37,6 +38,12 @@ module.exports = merge(common, {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
optimization: {
|
||||||
|
removeAvailableModules: false,
|
||||||
|
removeEmptyChunks: false,
|
||||||
|
splitChunks: false,
|
||||||
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
@ -56,7 +63,8 @@ module.exports = merge(common, {
|
|||||||
{
|
{
|
||||||
loader: 'ts-loader',
|
loader: 'ts-loader',
|
||||||
options: {
|
options: {
|
||||||
transpileOnly: true
|
transpileOnly: true,
|
||||||
|
experimentalWatchApi: true
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
},
|
},
|
||||||
|
@ -1,32 +1,43 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"outDir": "public/dist",
|
"outDir": "public/dist",
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": ["es6", "dom"],
|
"lib": [
|
||||||
"rootDir": "public/",
|
"es6",
|
||||||
"jsx": "react",
|
"dom"
|
||||||
"module": "esnext",
|
],
|
||||||
"declaration": false,
|
"rootDir": "public/",
|
||||||
"allowSyntheticDefaultImports": true,
|
"jsx": "react",
|
||||||
"inlineSourceMap": false,
|
"module": "esnext",
|
||||||
"sourceMap": true,
|
"declaration": false,
|
||||||
"noEmitOnError": false,
|
"allowSyntheticDefaultImports": true,
|
||||||
"emitDecoratorMetadata": false,
|
"esModuleInterop": true,
|
||||||
"experimentalDecorators": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"noImplicitReturns": true,
|
"importHelpers": true, // importing helper functions from tslib
|
||||||
"noImplicitThis": false,
|
"noEmitHelpers": true, // disable emitting inline helper functions
|
||||||
"noImplicitUseStrict":false,
|
"removeComments": false, // comments are needed by angular injections
|
||||||
"noImplicitAny": false,
|
"inlineSourceMap": false,
|
||||||
"noUnusedLocals": true,
|
"sourceMap": true,
|
||||||
"baseUrl": "public",
|
"noEmitOnError": false,
|
||||||
"paths": {
|
"emitDecoratorMetadata": false,
|
||||||
"app": ["app"]
|
"experimentalDecorators": true,
|
||||||
}
|
"noImplicitReturns": true,
|
||||||
},
|
"noImplicitThis": false,
|
||||||
"include": [
|
"noImplicitUseStrict": false,
|
||||||
"public/app/**/*.ts",
|
"noImplicitAny": false,
|
||||||
"public/app/**/*.tsx",
|
"noUnusedLocals": true,
|
||||||
"public/test/**/*.ts"
|
"baseUrl": "public",
|
||||||
]
|
"pretty": true,
|
||||||
}
|
"paths": {
|
||||||
|
"app": [
|
||||||
|
"app"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"public/app/**/*.ts",
|
||||||
|
"public/app/**/*.tsx",
|
||||||
|
"public/test/**/*.ts"
|
||||||
|
]
|
||||||
|
}
|
@ -3101,7 +3101,7 @@ d3-request@1.0.6:
|
|||||||
d3-dsv "1"
|
d3-dsv "1"
|
||||||
xmlhttprequest "1"
|
xmlhttprequest "1"
|
||||||
|
|
||||||
d3-scale-chromatic@^1.1.1:
|
d3-scale-chromatic@^1.3.0:
|
||||||
version "1.3.0"
|
version "1.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-1.3.0.tgz#7ee38ffcaa7ad55cfed83a6a668aac5570c653c4"
|
resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-1.3.0.tgz#7ee38ffcaa7ad55cfed83a6a668aac5570c653c4"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -7974,7 +7974,7 @@ mocha@^4.0.1:
|
|||||||
mkdirp "0.5.1"
|
mkdirp "0.5.1"
|
||||||
supports-color "4.4.0"
|
supports-color "4.4.0"
|
||||||
|
|
||||||
moment@^2.18.1:
|
moment@^2.22.2:
|
||||||
version "2.22.2"
|
version "2.22.2"
|
||||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66"
|
resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66"
|
||||||
|
|
||||||
@ -12029,6 +12029,10 @@ tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
|
|||||||
version "1.9.2"
|
version "1.9.2"
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.2.tgz#8be0cc9a1f6dc7727c38deb16c2ebd1a2892988e"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.2.tgz#8be0cc9a1f6dc7727c38deb16c2ebd1a2892988e"
|
||||||
|
|
||||||
|
tslib@^1.9.3:
|
||||||
|
version "1.9.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
|
||||||
|
|
||||||
tslint-loader@^3.5.3:
|
tslint-loader@^3.5.3:
|
||||||
version "3.6.0"
|
version "3.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/tslint-loader/-/tslint-loader-3.6.0.tgz#12ed4d5ef57d68be25cd12692fb2108b66469d76"
|
resolved "https://registry.yarnpkg.com/tslint-loader/-/tslint-loader-3.6.0.tgz#12ed4d5ef57d68be25cd12692fb2108b66469d76"
|
||||||
|
Loading…
Reference in New Issue
Block a user