update Webpack to 2.2
This commit is contained in:
parent
c5441923f7
commit
75d203c478
4 changed files with 15 additions and 17 deletions
|
@ -77,7 +77,7 @@ RUN chmod +x /usr/local/bin/jwtproxy
|
||||||
RUN curl -L -o /usr/local/bin/prometheus-aggregator https://github.com/coreos/prometheus-aggregator/releases/download/v0.0.1-alpha/prometheus-aggregator
|
RUN curl -L -o /usr/local/bin/prometheus-aggregator https://github.com/coreos/prometheus-aggregator/releases/download/v0.0.1-alpha/prometheus-aggregator
|
||||||
RUN chmod +x /usr/local/bin/prometheus-aggregator
|
RUN chmod +x /usr/local/bin/prometheus-aggregator
|
||||||
|
|
||||||
# Install Webpack, Typescript, React
|
# Install Webpack, Typescript
|
||||||
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
||||||
ADD package.json package.json
|
ADD package.json package.json
|
||||||
ADD tsconfig.json tsconfig.json
|
ADD tsconfig.json tsconfig.json
|
||||||
|
@ -88,11 +88,9 @@ RUN npm link typescript
|
||||||
|
|
||||||
# Add static files
|
# Add static files
|
||||||
ADD static static
|
ADD static static
|
||||||
ADD static/js/directives/components static/dist/components
|
|
||||||
|
|
||||||
# Run Webpack
|
# Run Webpack
|
||||||
RUN npm install -g webpack
|
RUN node_modules/.bin/webpack --progress
|
||||||
RUN webpack
|
|
||||||
|
|
||||||
# Run front-end tests
|
# Run front-end tests
|
||||||
ARG RUN_TESTS=true
|
ARG RUN_TESTS=true
|
||||||
|
|
|
@ -59,6 +59,6 @@
|
||||||
"ts-loader": "0.9.5",
|
"ts-loader": "0.9.5",
|
||||||
"typescript": "2.0.3",
|
"typescript": "2.0.3",
|
||||||
"typings": "1.4.0",
|
"typings": "1.4.0",
|
||||||
"webpack": "1.13.3"
|
"webpack": "^2.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ class body extends React.Component<IBody, IBodyState> {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
let intervalId: number = setInterval(() => this.getBuilds(), 1000);
|
let intervalId: number = window.setInterval(() => this.getBuilds(), 1000);
|
||||||
this.setState({
|
this.setState({
|
||||||
currentBuild: this.state.currentBuild,
|
currentBuild: this.state.currentBuild,
|
||||||
intervalId: intervalId
|
intervalId: intervalId
|
||||||
|
|
|
@ -8,17 +8,17 @@ var config = {
|
||||||
filename: "bundle.js"
|
filename: "bundle.js"
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ["", ".ts", ".tsx", ".js", ".scss"],
|
extensions: [".ts", ".tsx", ".js", ".scss"],
|
||||||
alias: {
|
alias: {
|
||||||
"sass": path.resolve('./static/css/directives/components/pages/')
|
sass: path.resolve(__dirname, 'static/css/directives/components/pages/')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Use window.angular to maintain compatibility with non-Webpack components
|
// Use window.angular to maintain compatibility with non-Webpack components
|
||||||
externals: {
|
externals: {
|
||||||
"angular": "angular",
|
angular: "angular",
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.tsx?$/,
|
test: /\.tsx?$/,
|
||||||
loader: "ts-loader",
|
loader: "ts-loader",
|
||||||
|
@ -26,13 +26,13 @@ var config = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.scss$/,
|
test: /\.scss$/,
|
||||||
loaders: ['style', 'css', 'sass'],
|
use: [
|
||||||
|
"style-loader",
|
||||||
|
"css-loader",
|
||||||
|
"sass-loader",
|
||||||
|
],
|
||||||
exclude: /node_modules/
|
exclude: /node_modules/
|
||||||
},
|
},
|
||||||
{
|
|
||||||
test: /angular\.js$/,
|
|
||||||
loader: 'expose?angular',
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
devtool: "source-map",
|
devtool: "source-map",
|
||||||
|
|
Reference in a new issue