refactoring

This commit is contained in:
Philipp Kühn
2018-08-22 13:39:09 +02:00
parent 3025642dfb
commit 3a83e3397c

View File

@@ -16,7 +16,7 @@ export default {
mode: ifDev('development', 'production'), mode: ifDev('development', 'production'),
entry: { entry: {
examples: removeEmpty([ app: removeEmpty([
ifDev('webpack-hot-middleware/client?reload=true'), ifDev('webpack-hot-middleware/client?reload=true'),
`${srcPath}/assets/sass/main.scss`, `${srcPath}/assets/sass/main.scss`,
`${srcPath}/main.js`, `${srcPath}/main.js`,
@@ -34,13 +34,11 @@ export default {
extensions: ['.js', '.scss', '.vue'], extensions: ['.js', '.scss', '.vue'],
alias: { alias: {
vue$: 'vue/dist/vue.esm.js', vue$: 'vue/dist/vue.esm.js',
modernizr: path.resolve(rootPath, '../.modernizr'),
modules: path.resolve(rootPath, '../node_modules'), modules: path.resolve(rootPath, '../node_modules'),
images: `${srcPath}/assets/images`, images: `${srcPath}/assets/images`,
fonts: `${srcPath}/assets/fonts`, fonts: `${srcPath}/assets/fonts`,
variables: `${srcPath}/assets/sass/variables`, variables: `${srcPath}/assets/sass/variables`,
settings: `${srcPath}/assets/sass/1-settings/index`, settings: `${srcPath}/assets/sass/1-settings/index`,
utilityFunctions: `${srcPath}/assets/sass/2-utility-functions/index`,
tiptap: path.resolve(rootPath, '../src'), tiptap: path.resolve(rootPath, '../src'),
}, },
modules: [ modules: [
@@ -62,11 +60,6 @@ export default {
loader: ifDev('babel-loader?cacheDirectory=true', 'babel-loader'), loader: ifDev('babel-loader?cacheDirectory=true', 'babel-loader'),
exclude: /node_modules(?!\/quill)/, exclude: /node_modules(?!\/quill)/,
}, },
{
test: /\.(graphql|gql)$/,
loader: 'graphql-tag/loader',
exclude: /node_modules/,
},
{ {
test: /\.css$/, test: /\.css$/,
use: removeEmpty([ use: removeEmpty([
@@ -129,15 +122,6 @@ export default {
// 'process.env': {}, // 'process.env': {},
// }), // }),
// copy static files
new CopyWebpackPlugin([
{
context: `${srcPath}/assets/static`,
from: { glob: '**/*', dot: false },
to: `${buildPath}/assets`,
},
]),
// enable hot reloading // enable hot reloading
ifDev(new webpack.HotModuleReplacementPlugin()), ifDev(new webpack.HotModuleReplacementPlugin()),