How to prevent plugin from compilling js? #24
JONMARSHALDEV
started this conversation in
General
Replies: 1 comment 1 reply
-
|
The Pug plugin doesn't play any role here. The native Pug syntax to include raw JavaScript source in resulting HTML: append head
script: include ./main.jsIf you need to load raw JS as external file, then place this file to public directory with compiled js files, e.g. append head script(src='/assets/js/main.js' defer='')To copy your raw source file in public directory, you can use the 'copy-webpack-plugin' Otherwise is impossible to prevent the Webpack from compilling js. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
i cant figure how to prevent plugin from compilling js.
i want to include "js" as-is.
for example i have script:
console.log('\n>> Home page'); var a = "MARSHALL"; console.log(a); var b = a + " JOHN"; console.log(b);it includes, but webpack processing it to:
(()=>{console.log("\n>> Home page");console.log("MARSHALL"),console.log("MARSHALL JOHN")})();i'm adding script to head:
append head script(src=require('./main.js') defer='')pls help.
Beta Was this translation helpful? Give feedback.
All reactions