2
0
mirror of https://github.com/tenrok/vue-ganttastic.git synced 2026-06-12 04:22:26 +03:00

fix: webpack

This commit is contained in:
2021-10-14 17:47:25 +03:00
parent c54d372543
commit 8ca4d60e64
3 changed files with 26 additions and 29 deletions
+1 -1
View File
@@ -6,6 +6,6 @@
</head>
<body>
<div id="vue-ganttastic-825301a1"></div>
<script src="/dist/build.js"></script>
<script src="/dist/index.js"></script>
</body>
</html>
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tenrok/vue-ganttastic",
"version": "0.10.7",
"version": "0.10.8",
"description": "A simple and customizable Gantt chart component for Vue.js",
"keywords": [
"gantt",
@@ -34,7 +34,7 @@
"files": [
"dist/*"
],
"main": "src/main.js",
"main": "./dist/index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/tenrok/vue-ganttastic.git"
+23 -26
View File
@@ -6,54 +6,51 @@ module.exports = {
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
filename: 'build.js'
filename: 'index.js',
},
module: {
rules: [
{
test: /\.css$/,
use: [
'vue-style-loader',
'css-loader'
],
}, {
use: ['vue-style-loader', 'css-loader'],
},
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
}
loaders: {},
// other vue-loader options go here
}
},
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
exclude: /node_modules/,
},
{
test: /\.(png|jpg|gif|svg)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]?[hash]'
}
}
]
name: '[name].[ext]?[hash]',
},
},
],
},
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js'
vue$: 'vue/dist/vue.esm.js',
},
extensions: ['*', '.js', '.vue', '.json']
extensions: ['*', '.js', '.vue', '.json'],
},
devServer: {
historyApiFallback: true,
noInfo: true,
overlay: true
overlay: true,
},
performance: {
hints: false
hints: false,
},
devtool: '#eval-source-map'
devtool: '#eval-source-map',
}
if (process.env.NODE_ENV === 'production') {
@@ -62,17 +59,17 @@ if (process.env.NODE_ENV === 'production') {
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
NODE_ENV: '"production"',
},
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
sourceMap: false,
compress: {
warnings: false
}
warnings: false,
},
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
minimize: true,
}),
])
}