Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to compile the js/css #13

Open
Mte90 opened this issue Jan 25, 2021 · 2 comments
Open

How to compile the js/css #13

Mte90 opened this issue Jan 25, 2021 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@Mte90
Copy link
Contributor

Mte90 commented Jan 25, 2021

It is not clear how to compile it, the wiki has a page https://github.com/grrr-amsterdam/cookie-consent/wiki/Usage-with-build-tools but there are no commands for any of them.

Also for Babel there is already a config file and the various releases don't include any ready js/css file to embed it.

@Mte90
Copy link
Contributor Author

Mte90 commented Jan 26, 2021

I was able to compile it with rollup.

rollup.config.js:

import { nodeResolve } from '@rollup/plugin-node-resolve';

export default {
  input: 'index.mjs',
  output: {
    dir: 'dist',
    format: 'iife',
    name: 'CookieConsent'
  },
  plugins: [nodeResolve()]
};

@HammenWS HammenWS added the documentation Improvements or additions to documentation label Mar 10, 2021
@nikelone
Copy link

nikelone commented Apr 17, 2021

Hi same issue here. I made it almost build with webpack 5 and babel with these settings,


 {
        test: /\.m?js$/,
        resolve: {
          fullySpecified: false,
          extensions: ['.wasm', '.mjs', '.js', '.jsx', '.json', '.scss', '.css'],
        },
        use: {
          loader: 'babel-loader',
          options: {
            presets: ['@babel/preset-env'],
          },
        },
      }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants