Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Install the package in your project using the command shell

    Code Block
    npm install git+https://github.com/hawksearch/vue-hawksearch.git#latest
  2. Create a directory in your assets folder to include all Vue.js resources (e.g. assets/js/vue).

  3. Create an index.js at a root level and add it as an entry file in webpack.config.js

    Code Block
    module.exports = {
        entry: {
            main: [
                './assets/src/js/vue/index.js'
                ...
            ]
        },
        resolve: {
            alias: {
                'vue$': 'vue/dist/vue.min.js',
                src: path.resolve(__dirname, 'src')
            },
            extensions: ['*', '.js', '.vue', '.json']
        },
        module: {
          rules: [
            {
              test: /\.css$/i,
              use: ["style-loader", "css-loader"],
            },
          ],
        },
        ...
    }
Info

To resolve the styles install Webpack css loader plugin:

...