Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Streamline webpack with all other apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
- Loading branch information
1 parent
650d516
commit a77ce48
Showing
8 changed files
with
4,564 additions
and
4,219 deletions.
There are no files selected for viewing
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 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,42 @@ | ||
const path = require('path'); | ||
const { VueLoaderPlugin } = require('vue-loader'); | ||
|
||
module.exports = { | ||
entry: path.join(__dirname, 'init.js'), | ||
output: { | ||
path: path.resolve(__dirname, '../js'), | ||
publicPath: '/js/', | ||
filename: 'notifications.js' | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.css$/, | ||
use: ['vue-style-loader', 'css-loader'] | ||
}, | ||
{ | ||
test: /\.vue$/, | ||
loader: 'vue-loader' | ||
}, | ||
{ | ||
test: /\.js$/, | ||
loader: 'babel-loader', | ||
exclude: /node_modules/ | ||
}, | ||
{ | ||
test: /\.(png|jpg|gif|svg)$/, | ||
loader: 'file-loader', | ||
options: { | ||
name: '[name].[ext]?[hash]' | ||
} | ||
} | ||
] | ||
}, | ||
plugins: [new VueLoaderPlugin()], | ||
resolve: { | ||
alias: { | ||
vue$: 'vue/dist/vue.esm.js' | ||
}, | ||
extensions: ['*', '.js', '.vue', '.json'] | ||
} | ||
}; |
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,12 @@ | ||
const merge = require('webpack-merge'); | ||
const common = require('./webpack.common.js'); | ||
|
||
module.exports = merge(common, { | ||
mode: 'development', | ||
devServer: { | ||
historyApiFallback: true, | ||
noInfo: true, | ||
overlay: true | ||
}, | ||
devtool: '#eval-source-map', | ||
}); |
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,7 @@ | ||
const merge = require('webpack-merge') | ||
const common = require('./webpack.common.js') | ||
|
||
module.exports = merge(common, { | ||
mode: 'production', | ||
devtool: '#source-map' | ||
}); |
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
Oops, something went wrong.