mirror of
https://github.com/jzillmann/pdf-to-markdown.git
synced 2025-08-16 00:27:53 +02:00
Hello World Vue App
This commit is contained in:
58
webpack.config.js
Normal file
58
webpack.config.js
Normal file
@ -0,0 +1,58 @@
|
||||
var path = require('path')
|
||||
var sourceDir = path.resolve(__dirname, 'src');
|
||||
|
||||
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: './src/main.js',
|
||||
output: {
|
||||
// To the `dist` folder
|
||||
path: './dist',
|
||||
// With the filename `build.js` so it's dist/build.js
|
||||
filename: 'build.js'
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['', '.js', '.vue'],
|
||||
fallback: [path.join(__dirname, '../node_modules')],
|
||||
alias: {
|
||||
'vue$': 'vue/dist/vue',
|
||||
'src': path.resolve(__dirname, '../src'),
|
||||
'assets': path.resolve(__dirname, '../src/assets'),
|
||||
'components': path.resolve(__dirname, '../src/components')
|
||||
}
|
||||
},
|
||||
resolveLoader: {
|
||||
fallback: [path.join(__dirname, '../node_modules')]
|
||||
},
|
||||
module: {
|
||||
// Special compilation rules
|
||||
loaders: [
|
||||
{
|
||||
// Ask webpack to check: If this file ends with .js, then apply some transforms
|
||||
test: /\.js$/,
|
||||
// Transform it with babel
|
||||
loader: 'babel',
|
||||
// don't transform node_modules folder (which don't need to be compiled)
|
||||
exclude: /node_modules/
|
||||
},
|
||||
{
|
||||
test: /\.vue$/,
|
||||
loader: 'vue'
|
||||
},
|
||||
{
|
||||
test: /\.png$/,
|
||||
loader: "url-loader?limit=100000"
|
||||
},
|
||||
]
|
||||
},
|
||||
vue: {
|
||||
loaders: {
|
||||
js: 'babel'
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: sourceDir + '/index.html'
|
||||
})
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user