diff --git a/.eslintrc b/.eslintrc index 71aefcfa9..ad4aa56f7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,6 +1,7 @@ { "globals": { - "ga": true + "ga": true, + "chrome": true }, "plugins": ["html", "json"], "extends": "elemefe", diff --git a/build/webpack.extension.js b/build/webpack.extension.js new file mode 100644 index 000000000..2f8752c59 --- /dev/null +++ b/build/webpack.extension.js @@ -0,0 +1,33 @@ +const path = require('path'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); +const demoConfig = require('./webpack.demo'); +const webpack = require('webpack'); +const ProgressBarPlugin = require('progress-bar-webpack-plugin'); +const VueLoaderPlugin = require('vue-loader/lib/plugin'); + +demoConfig.entry = { + background: path.join(process.cwd(), './examples/extension/src/background'), + entry: path.join(process.cwd(), './examples/extension/src/entry') +}; +demoConfig.output = { + path: path.join(process.cwd(), './examples/extension/dist'), + filename: '[name].js' +}; +demoConfig.plugins = [ + new CopyWebpackPlugin([ + { from: 'examples/extension/src/manifest.json' }, + { from: 'examples/extension/src/icon.png' } + ]), + new VueLoaderPlugin(), + new ProgressBarPlugin(), + new webpack.LoaderOptionsPlugin({ + vue: { + compilerOptions: { + preserveWhitespace: false + } + } + }), + new webpack.HotModuleReplacementPlugin() +]; +demoConfig.module.rules.find(a => a.loader === 'url-loader').query = {}; +module.exports = demoConfig; diff --git a/examples/components/theme-configurator/editor/borderRadius.vue b/examples/components/theme-configurator/editor/borderRadius.vue index e266dc8cc..8ee85f267 100644 --- a/examples/components/theme-configurator/editor/borderRadius.vue +++ b/examples/components/theme-configurator/editor/borderRadius.vue @@ -1,7 +1,7 @@