mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-01-06 13:15:24 +08:00
Merge pull request #59 from lowdefy/webpack-server
chore: update webpack server config
This commit is contained in:
commit
94f7b2af6f
@ -26,12 +26,13 @@
|
||||
"dist/*"
|
||||
],
|
||||
"scripts": {
|
||||
"start": "webpack serve",
|
||||
"build": "babel src --copy-files --out-dir dist",
|
||||
"test": "jest --coverage",
|
||||
"dev": "webpack serve",
|
||||
"npm-publish": "npm publish --access public",
|
||||
"prepare": "yarn build",
|
||||
"prepublishOnly": "yarn build",
|
||||
"npm-publish": "npm publish --access public"
|
||||
"start": "webpack serve",
|
||||
"test": "jest --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lowdefy/helpers": "1.0.0",
|
||||
@ -70,4 +71,4 @@
|
||||
"yaml-jest": "1.0.5",
|
||||
"yaml-loader": "0.6.0"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
const { merge } = require('webpack-merge');
|
||||
const webpack = require('webpack');
|
||||
const common = require('./webpack.common.js');
|
||||
const path = require('path');
|
||||
|
||||
@ -7,6 +8,11 @@ module.exports = merge(common, {
|
||||
devtool: 'eval-source-map',
|
||||
devServer: {
|
||||
contentBase: path.join(__dirname, 'dist'),
|
||||
port: 3001,
|
||||
port: 3000,
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('development'),
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -1,6 +1,12 @@
|
||||
const { merge } = require('webpack-merge');
|
||||
const webpack = require('webpack');
|
||||
const common = require('./webpack.common.js');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -26,12 +26,13 @@
|
||||
"dist/*"
|
||||
],
|
||||
"scripts": {
|
||||
"start": "webpack serve",
|
||||
"build": "babel src --out-dir dist",
|
||||
"test": "jest --coverage",
|
||||
"dev": "webpack serve",
|
||||
"npm-publish": "npm publish --access public",
|
||||
"prepare": "yarn build",
|
||||
"prepublishOnly": "yarn build",
|
||||
"npm-publish": "npm publish --access public"
|
||||
"start": "webpack serve",
|
||||
"test": "jest --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lowdefy/type": "1.0.1",
|
||||
@ -68,4 +69,4 @@
|
||||
"yaml-jest": "1.0.5",
|
||||
"yaml-loader": "0.6.0"
|
||||
}
|
||||
}
|
||||
}
|
@ -29,8 +29,8 @@
|
||||
"build": "webpack --config webpack.prod.js",
|
||||
"clean": "rm -rf dist",
|
||||
"prepublishOnly": "yarn build",
|
||||
"serve": "serve dist -p 3001",
|
||||
"start": "webpack serve"
|
||||
"start": "serve dist -p 3001",
|
||||
"dev": "webpack serve --config webpack.dev.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apollo/client": "3.2.4",
|
||||
@ -64,4 +64,4 @@
|
||||
"webpack-dev-server": "3.11.0",
|
||||
"webpack-merge": "5.2.0"
|
||||
}
|
||||
}
|
||||
}
|
@ -31,7 +31,7 @@ const retryLink = new RetryLink();
|
||||
|
||||
// TODO: make uri configurable
|
||||
const httpLink = new HttpLink({
|
||||
uri: '/api/graphql',
|
||||
uri: process.env.GRAPHQL_URI,
|
||||
});
|
||||
|
||||
// TODO: Handle errors
|
||||
|
@ -1,7 +1,9 @@
|
||||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.common.js');
|
||||
const webpack = require('webpack');
|
||||
const path = require('path');
|
||||
|
||||
const common = require('./webpack.common.js');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'development',
|
||||
devtool: 'eval-source-map',
|
||||
@ -9,4 +11,11 @@ module.exports = merge(common, {
|
||||
contentBase: path.join(__dirname, 'dist'),
|
||||
port: 3001,
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('development'),
|
||||
'process.env.GRAPHQL_URI': JSON.stringify('http://localhost:3000/api/graphql'),
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
@ -1,6 +1,13 @@
|
||||
const { merge } = require('webpack-merge');
|
||||
const webpack = require('webpack');
|
||||
const common = require('./webpack.common.js');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify('production'),
|
||||
'process.env.GRAPHQL_URI': JSON.stringify('/api/graphql'),
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user