forked from drewthoennes/Bored-API
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
973fdb3
commit 66a5354
Showing
53 changed files
with
8,217 additions
and
15,318 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
NODE_ENV= | ||
KEEN_PROJECT_ID= | ||
KEEN_WRITE_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
web: node index.js | ||
web: node server.js |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,65 @@ | ||
'use strict' | ||
const path = require('path') | ||
const utils = require('./utils') | ||
const config = require('../config') | ||
const vueLoaderConfig = require('./vue-loader.conf') | ||
const path = require('path'); | ||
const { VueLoaderPlugin } = require('vue-loader'); | ||
const CopyWebpackPlugin = require('copy-webpack-plugin'); | ||
|
||
function resolve (dir) { | ||
return path.join(__dirname, '..', dir) | ||
} | ||
|
||
|
||
|
||
module.exports = { | ||
context: path.resolve(__dirname, '../'), | ||
entry: { | ||
app: './src/client/main.js' | ||
app: './src/frontend/main.js' | ||
}, | ||
output: { | ||
path: config.build.assetsRoot, | ||
filename: '[name].js', | ||
publicPath: process.env.NODE_ENV === 'production' | ||
? config.build.assetsPublicPath | ||
: config.dev.assetsPublicPath | ||
path: resolve('dist'), | ||
filename: '[name].js' | ||
}, | ||
resolve: { | ||
extensions: ['.js', '.vue', '.json'], | ||
alias: { | ||
'vue$': 'vue/dist/vue.esm.js', | ||
'@': resolve('src/client'), | ||
'@': resolve('src/frontend'), | ||
} | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.vue$/, | ||
loader: 'vue-loader', | ||
options: vueLoaderConfig | ||
loader: 'vue-loader' | ||
}, | ||
{ | ||
test: /\.js$/, | ||
loader: 'babel-loader', | ||
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] | ||
}, | ||
{ | ||
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, | ||
loader: 'url-loader', | ||
options: { | ||
limit: 10000, | ||
name: utils.assetsPath('img/[name].[hash:7].[ext]') | ||
} | ||
}, | ||
{ | ||
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, | ||
loader: 'url-loader', | ||
options: { | ||
limit: 10000, | ||
name: utils.assetsPath('media/[name].[hash:7].[ext]') | ||
exclude: /node_modules/, | ||
use: { | ||
loader: 'babel-loader', | ||
options: { | ||
babelrc: false, | ||
presets: [ | ||
'@babel/preset-env' | ||
], | ||
cacheDirectory: true | ||
} | ||
} | ||
}, | ||
{ | ||
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, | ||
loader: 'url-loader', | ||
options: { | ||
limit: 10000, | ||
name: utils.assetsPath('fonts/[name].[hash:7].[ext]') | ||
} | ||
test: /\.css$/, | ||
use: [ | ||
'vue-style-loader', | ||
{ | ||
loader: 'css-loader' | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
node: { | ||
// prevent webpack from injecting useless setImmediate polyfill because Vue | ||
// source contains it (although only uses it if it's native). | ||
setImmediate: false, | ||
// prevent webpack from injecting mocks to Node native modules | ||
// that does not make sense for the client | ||
dgram: 'empty', | ||
fs: 'empty', | ||
net: 'empty', | ||
tls: 'empty', | ||
child_process: 'empty' | ||
} | ||
plugins: [ | ||
new VueLoaderPlugin(), | ||
new CopyWebpackPlugin([ | ||
{ | ||
from: resolve('static'), | ||
to: resolve('dist'), | ||
ignore: ['.*'] | ||
} | ||
]) | ||
] | ||
} |
Oops, something went wrong.