Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
d150b62d
Commit
d150b62d
authored
Dec 03, 2018
by
David Kaltschmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stick to .tsx? for babel file test
parent
5038efe0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
28 deletions
+27
-28
scripts/webpack/webpack.hot.js
+27
-28
No files found.
scripts/webpack/webpack.hot.js
View file @
d150b62d
...
@@ -4,22 +4,19 @@ const merge = require('webpack-merge');
...
@@ -4,22 +4,19 @@ const merge = require('webpack-merge');
const
common
=
require
(
'./webpack.common.js'
);
const
common
=
require
(
'./webpack.common.js'
);
const
path
=
require
(
'path'
);
const
path
=
require
(
'path'
);
const
webpack
=
require
(
'webpack'
);
const
webpack
=
require
(
'webpack'
);
const
HtmlWebpackPlugin
=
require
(
"html-webpack-plugin"
);
const
HtmlWebpackPlugin
=
require
(
'html-webpack-plugin'
);
const
HtmlWebpackHarddiskPlugin
=
require
(
'html-webpack-harddisk-plugin'
);
const
HtmlWebpackHarddiskPlugin
=
require
(
'html-webpack-harddisk-plugin'
);
const
CleanWebpackPlugin
=
require
(
'clean-webpack-plugin'
);
const
CleanWebpackPlugin
=
require
(
'clean-webpack-plugin'
);
module
.
exports
=
merge
(
common
,
{
module
.
exports
=
merge
(
common
,
{
entry
:
{
entry
:
{
app
:
[
app
:
[
'webpack-dev-server/client?http://localhost:3333'
,
'./public/app/dev.ts'
],
'webpack-dev-server/client?http://localhost:3333'
,
'./public/app/dev.ts'
,
],
},
},
output
:
{
output
:
{
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
,
pathinfo
:
false
,
},
},
...
@@ -34,8 +31,8 @@ module.exports = merge(common, {
...
@@ -34,8 +31,8 @@ module.exports = merge(common, {
hot
:
true
,
hot
:
true
,
port
:
3333
,
port
:
3333
,
proxy
:
{
proxy
:
{
'!/public/build'
:
'http://localhost:3000'
'!/public/build'
:
'http://localhost:3000'
,
}
}
,
},
},
optimization
:
{
optimization
:
{
...
@@ -47,46 +44,48 @@ module.exports = merge(common, {
...
@@ -47,46 +44,48 @@ module.exports = merge(common, {
module
:
{
module
:
{
rules
:
[
rules
:
[
{
{
test
:
/
\.
(
j|t
)
sx
?
$/
,
test
:
/
\.
t
sx
?
$/
,
exclude
:
/node_modules/
,
exclude
:
/node_modules/
,
use
:
[{
use
:
[
{
loader
:
'babel-loader'
,
loader
:
'babel-loader'
,
options
:
{
options
:
{
cacheDirectory
:
true
,
cacheDirectory
:
true
,
babelrc
:
false
,
babelrc
:
false
,
plugins
:
[
plugins
:
[
[
require
(
"@rtsao/plugin-proposal-class-properties"
),
{
loose
:
true
}],
[
require
(
'@rtsao/plugin-proposal-class-properties'
),
{
loose
:
true
}],
'angularjs-annotate'
,
'angularjs-annotate'
,
'syntax-dynamic-import'
,
// needed for `() => import()` in routes.ts
'syntax-dynamic-import'
,
// needed for `() => import()` in routes.ts
'react-hot-loader/babel'
'react-hot-loader/babel'
,
],
],
presets
:
[
presets
:
[
[
[
'@babel/preset-env'
,
'@babel/preset-env'
,
{
{
targets
:
{
browsers
:
'last 3 versions'
},
targets
:
{
browsers
:
'last 3 versions'
},
useBuiltIns
:
'entry'
useBuiltIns
:
'entry'
,
}
},
],
],
'@babel/preset-typescript'
,
'@babel/preset-typescript'
,
'@babel/preset-react'
'@babel/preset-react'
,
],
},
},
],
],
}
}],
},
},
{
{
test
:
/
\.
scss$/
,
test
:
/
\.
scss$/
,
use
:
[
use
:
[
"style-loader"
,
// creates style nodes from JS strings
'style-loader'
,
// creates style nodes from JS strings
"css-loader"
,
// translates CSS into CommonJS
'css-loader'
,
// translates CSS into CommonJS
"sass-loader"
// compiles Sass to CSS
'sass-loader'
,
// compiles Sass to CSS
]
]
,
},
},
{
{
test
:
/
\.(
png|jpg|gif|ttf|eot|svg|woff
(
2
)?)(\?[
a-z0-9=&.
]
+
)?
$/
,
test
:
/
\.(
png|jpg|gif|ttf|eot|svg|woff
(
2
)?)(\?[
a-z0-9=&.
]
+
)?
$/
,
loader
:
'file-loader'
loader
:
'file-loader'
,
},
},
]
]
,
},
},
plugins
:
[
plugins
:
[
...
@@ -95,16 +94,16 @@ module.exports = merge(common, {
...
@@ -95,16 +94,16 @@ module.exports = merge(common, {
filename
:
path
.
resolve
(
__dirname
,
'../../public/views/index.html'
),
filename
:
path
.
resolve
(
__dirname
,
'../../public/views/index.html'
),
template
:
path
.
resolve
(
__dirname
,
'../../public/views/index-template.html'
),
template
:
path
.
resolve
(
__dirname
,
'../../public/views/index-template.html'
),
inject
:
'body'
,
inject
:
'body'
,
alwaysWriteToDisk
:
true
alwaysWriteToDisk
:
true
,
}),
}),
new
HtmlWebpackHarddiskPlugin
(),
new
HtmlWebpackHarddiskPlugin
(),
new
webpack
.
NamedModulesPlugin
(),
new
webpack
.
NamedModulesPlugin
(),
new
webpack
.
HotModuleReplacementPlugin
(),
new
webpack
.
HotModuleReplacementPlugin
(),
new
webpack
.
DefinePlugin
({
new
webpack
.
DefinePlugin
({
'GRAFANA_THEME'
:
JSON
.
stringify
(
process
.
env
.
GRAFANA_THEME
||
'dark'
),
GRAFANA_THEME
:
JSON
.
stringify
(
process
.
env
.
GRAFANA_THEME
||
'dark'
),
'process.env'
:
{
'process.env'
:
{
'NODE_ENV'
:
JSON
.
stringify
(
'development'
)
NODE_ENV
:
JSON
.
stringify
(
'development'
),
}
}
,
}),
}),
]
]
,
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment