Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package update #81

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 30 additions & 7 deletions frontend/.babelrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
[
"@babel/preset-env",
{
"modules": false,
"targets": {
"browsers": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
}
}],
"stage-2"
]
],
"plugins": ["transform-vue-jsx", "transform-runtime"]
"plugins": [
"transform-vue-jsx",
"@babel/plugin-transform-runtime",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions"
]
}
8 changes: 6 additions & 2 deletions frontend/build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const VueLoaderPlugin = require('vue-loader/lib/plugin')
const vueLoaderConfig = require('./vue-loader.conf')

function resolve (dir) {
function resolve(dir) {
return path.join(__dirname, '..', dir)
}

Expand Down Expand Up @@ -78,5 +79,8 @@ module.exports = {
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
},
plugins: [
new VueLoaderPlugin()
]
}
1 change: 1 addition & 0 deletions frontend/build/webpack.dev.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
},
// cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool,
mode : 'development',

// these devServer options should be customized in /config/index.js
devServer: {
Expand Down
3 changes: 2 additions & 1 deletion frontend/build/webpack.prod.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const webpackConfig = merge(baseWebpackConfig, {
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : false,
mode: 'production',
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
Expand Down Expand Up @@ -81,7 +82,7 @@ const webpackConfig = merge(baseWebpackConfig, {
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks (module) {
minChunks(module) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
Expand Down
4 changes: 2 additions & 2 deletions frontend/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
*/

// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
devtool: 'inline-source-map',

// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
Expand All @@ -51,7 +51,7 @@ module.exports = {

productionSourceMap: true,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
devtool: false,

// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
Expand Down
Loading