Skip to content

Commit

Permalink
Fix $params in web bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
Frizi committed May 24, 2018
1 parent b1c61b6 commit 55fac61
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
3 changes: 2 additions & 1 deletion build/webpack.bundle.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ module.exports = merge(base, {
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
NODE_ENV: '"production"',
BUILD: '"web"'
}
})
],
Expand Down
3 changes: 2 additions & 1 deletion build/webpack.dev.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ module.exports = merge(baseWebpackConfig, {
devtool: '#eval',
plugins: [
new webpack.DefinePlugin({
'process.env': config.dev.env
'process.env': config.dev.env,
'process.env.BUILD': '"dev"'
}),
new webpack.HotModuleReplacementPlugin(),
new HtmlWebpackPlugin({
Expand Down
3 changes: 2 additions & 1 deletion build/webpack.docs.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ var webpackConfig = merge(baseWebpackConfig, {
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
'process.env.NODE_ENV': env.NODE_ENV,
'process.env.BUILD': '"docs"'
}),
// extract css into its own file
new MiniCssExtractPlugin({
Expand Down
2 changes: 1 addition & 1 deletion dist/validators.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vuelidate.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/withParamsBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
// fallback to stubbed WithParams on failure.

const root =
typeof global !== 'undefined'
? global
: typeof window !== 'undefined'
? window
typeof window !== 'undefined'
? window
: typeof global !== 'undefined'
? global
: {}

/* istanbul ignore next */
Expand Down

0 comments on commit 55fac61

Please sign in to comment.